Class TabView

    Definition

    Namespace:
    Tizen.NUI.Components
    Assembly:
    Tizen.NUI.Components.dll

    TabView is a class which contains a TabBar and TabContent. TabView adds TabButtons and Views to TabBar and TabContent in TabView by AddTab(TabButton, View). TabView removes TabButtons and Views from TabBar and TabContent in TabView by RemoveTab(int). TabView selects a view from the TabContent according to the selected TabButton in the TabBar.

    var tabView = new TabView()
    {
        WidthSpecification = LayoutParamPolicies.MatchParent,
        HeightSpecification = LayoutParamPolicies.MatchParent,
    };
    

    var tabButton = new TabButton() { Text = "Tab#1" };

    var content = new View() { BackgroundColor = Color.Red, WidthSpecification = LayoutParamPolicies.MatchParent, HeightSpecification = LayoutParamPolicies.MatchParent, };

    tabView.AddTab(tabButton, content);

    var tabButton2 = new TabButton() { Text = "Tab#2" };

    var content2 = new View() { BackgroundColor = Color.Green, WidthSpecification = LayoutParamPolicies.MatchParent, HeightSpecification = LayoutParamPolicies.MatchParent, };

    tabView.AddTab(tabButton2, content2);

    var tabButton3 = new TabButton() { Text = "Tab#3" };

    var content3 = new View() { BackgroundColor = Color.Blue, WidthSpecification = LayoutParamPolicies.MatchParent, HeightSpecification = LayoutParamPolicies.MatchParent, };

    tabView.AddTab(tabButton3, content3);

    public class TabView : Control, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
    Inheritance
    object
    BindableObject
    Element
    BaseHandle
    Animatable
    Container
    View
    ViewWrapper
    CustomView
    VisualView
    Control
    TabView
    Implements
    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider

    Constructors

    View Source

    TabView()

    Creates a new instance of TabView.

    Declaration
    public TabView()
    View Source

    TabView(string)

    Creates a new instance of TabView.

    Declaration
    public TabView(string style)
    Parameters
    Type Name Description
    string style

    Creates TabView by special style defined in UX.

    View Source

    TabView(ControlStyle)

    Creates a new instance of a TabView with style.

    Declaration
    public TabView(ControlStyle style)
    Parameters
    Type Name Description
    ControlStyle style

    A style applied to the newly created TabView.

    Properties

    View Source

    Content

    Gets TabContent of TabView.

    Declaration
    public TabContent Content { get; protected set; }
    Property Value
    Type Description
    TabContent
    View Source

    TabBar

    Gets TabBar of TabView.

    Declaration
    public TabBar TabBar { get; protected set; }
    Property Value
    Type Description
    TabBar

    Methods

    View Source

    Add(TabItem)

    Adds a tab from the given TabItem. TabItem contains Title and IconURL of a new TabButton in TabBar and Content of a new View in TabContent.

    The tab item which contains Title and IconURL of a new TabButton in TabBar and Content of a new View in TabContent.
    Declaration
    public virtual void Add(TabItem tabItem)
    Parameters
    Type Name Description
    TabItem tabItem
    View Source

    AddTab(TabButton, View)

    Adds a tab with tab button and content view.

    Declaration
    public void AddTab(TabButton tabButton, View view)
    Parameters
    Type Name Description
    TabButton tabButton

    A tab button to be added.

    View view

    A content view to be added.

    View Source

    Dispose(DisposeTypes)

    Dispose Control and all children on it.

    Declaration
    protected override void Dispose(DisposeTypes type)
    Parameters
    Type Name Description
    DisposeTypes type

    Dispose type.

    Overrides
    Control.Dispose(DisposeTypes)
    View Source

    OnInitialize()

    Overrides the parent method. This method is called by the framework when the instance is created.

    Declaration
    public override void OnInitialize()
    Overrides
    Control.OnInitialize()
    View Source

    RemoveTab(int)

    Removes a tab at the specified index of TabView. The indices of tabs(tab buttons and views) in TabView are basically the order of adding to TabView by AddTab(TabButton, View). So the index of a tab(tab button and view) in TabView can be changed whenever AddTab(TabButton, View) or RemoveTab(int) is called.

    Declaration
    public void RemoveTab(int index)
    Parameters
    Type Name Description
    int index

    The index of a tab(tab button and view) in TabView where the tab will be removed.

    Implements

    IDynamicResourceHandler
    INameScope
    System.IDisposable
    IResourcesProvider

    Extension Methods

    ViewExtensions.BackgroundColor(View)
    ViewExtensions.BorderlineColor(View)
    ViewExtensions.BoxShadow(View)
    ViewExtensions.Color(View)
    ViewExtensions.CornerRadius(View)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    ViewExtensions.BackgroundColor<T>(T, float, float, float, float)
    ViewExtensions.BackgroundColor<T>(T, uint, float)
    ViewExtensions.BackgroundColor<T>(T, UIColor)
    ViewExtensions.BackgroundImage<T>(T, string)
    ViewExtensions.Borderline<T>(T, float, UIColor, float)
    ViewExtensions.BorderlineColor<T>(T, float, float, float, float)
    ViewExtensions.BorderlineColor<T>(T, uint, float)
    ViewExtensions.BorderlineColor<T>(T, UIColor)
    ViewExtensions.BorderlineOffset<T>(T, float)
    ViewExtensions.BorderlineWidth<T>(T, float)
    ViewExtensions.BoxShadow<T>(T, float, float, float)
    ViewExtensions.BoxShadow<T>(T, float, UIColor, float, float)
    ViewExtensions.BoxShadow<T>(T, UIShadow)
    ViewExtensions.ClippingMode<T>(T, ClippingModeType)
    ViewExtensions.Color<T>(T, float, float, float, float)
    ViewExtensions.Color<T>(T, uint, float)
    ViewExtensions.Color<T>(T, UIColor)
    ViewExtensions.CornerRadius<T>(T, float, bool)
    ViewExtensions.CornerRadius<T>(T, float, float, float, float, bool)
    ViewExtensions.CornerRadius<T>(T, UICorner)
    ViewExtensions.Focusable<T>(T, bool)
    ViewExtensions.FocusableChildren<T>(T, bool)
    ViewExtensions.FocusableInTouch<T>(T, bool)
    ViewExtensions.ImageShadow<T>(T, ImageShadow)
    ViewExtensions.IsEnabled<T>(T, bool)
    ViewExtensions.Layout<T>(T, LayoutItem)
    ViewExtensions.Opacity<T>(T, float)
    ViewExtensions.Position<T>(T, float, float)
    ViewExtensions.PositionX<T>(T, float)
    ViewExtensions.PositionY<T>(T, float)
    ViewExtensions.Scale<T>(T, float, float)
    ViewExtensions.ScaleX<T>(T, float)
    ViewExtensions.ScaleY<T>(T, float)
    ViewExtensions.Sensitive<T>(T, bool)
    ViewExtensions.Size<T>(T, float, float)
    ViewExtensions.SizeHeight<T>(T, float)
    ViewExtensions.SizeWidth<T>(T, float)
    ViewExtensions.Visibility<T>(T, bool)
    ViewExtensions.VoiceInteractionName<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX