Class TabView

Definition

Namespace:
Tizen.NUI.Components
Assembly:
Tizen.NUI.Components.dll
API Level:
9

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(Int32). TabView selects a view from the TabContent according to the selected TabButton in the TabBar.

Copy
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);
C#
Copy
public class TabView : Control, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
Inheritance
Implements

Constructors

View Source

TabView()

Creates a new instance of TabView.

Declaration
C#
Copy
public TabView()
API Level: 9
View Source

TabView(String)

Creates a new instance of TabView.

Declaration
C#
Copy
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
C#
Copy
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
C#
Copy
public TabContent Content { get; protected set; }
Property Value
Type Description
TabContent
API Level: 9
View Source

TabBar

Gets TabBar of TabView.

Declaration
C#
Copy
public TabBar TabBar { get; protected set; }
Property Value
Type Description
TabBar
API Level: 9

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
C#
Copy
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
C#
Copy
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.

API Level: 9
View Source

Dispose(DisposeTypes)

Dispose Control and all children on it.

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

Dispose type.

Overrides
View Source

OnInitialize()

Overrides the parent method.

Declaration
C#
Copy
public override void OnInitialize()
Overrides
View Source

RemoveTab(Int32)

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(Int32) is called.

Declaration
C#
Copy
public void RemoveTab(int index)
Parameters
Type Name Description
Int32 index

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

API Level: 9

Implements

Extension Methods