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, INotifyPropertyChanged, IDisposable
    Inheritance
    object
    BindableObject
    Tizen.NUI.Binding.Element
    BaseHandle
    Animatable
    Container
    View
    ViewWrapper
    CustomView
    VisualView
    Tizen.NUI.Components.Control
    TabView
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Constructors

    View Source

    TabView()

    Creates a new instance of TabView.

    Declaration
    public 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

    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

    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.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when the index is less than 0, or greater than or equal to the number of tabs.

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX