Class Tabs
Tabs UI element.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class Tabs : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, INotifyValueChanged<int>Constructors
Tabs()
Default constructor.
Declaration
public Tabs()Fields
containerUssClassName
The Tabs container styling class.
Declaration
public const string containerUssClassName = "appui-tabs__container"Field Value
| Type | Description | 
|---|---|
| string | 
emphasizedUssClassName
The Tabs emphasized mode styling class.
Declaration
public const string emphasizedUssClassName = "appui-tabs--emphasized"Field Value
| Type | Description | 
|---|---|
| string | 
indicatorUssClassName
The Tabs indicator styling class.
Declaration
public const string indicatorUssClassName = "appui-tabs__indicator"Field Value
| Type | Description | 
|---|---|
| string | 
orientationUssClassName
The Tabs direction styling class.
Declaration
public const string orientationUssClassName = "appui-tabs--"Field Value
| Type | Description | 
|---|---|
| string | 
scrollViewUssClassName
The Tabs ScrollView styling class.
Declaration
public const string scrollViewUssClassName = "appui-tabs__scroll-view"Field Value
| Type | Description | 
|---|---|
| string | 
sizeUssClassName
The Tabs size styling class.
Declaration
public const string sizeUssClassName = "appui-tabs--size-"Field Value
| Type | Description | 
|---|---|
| string | 
ussClassName
The Tabs main styling class.
Declaration
public const string ussClassName = "appui-tabs"Field Value
| Type | Description | 
|---|---|
| string | 
Properties
bindItem
Method to bind the TabItem.
Declaration
public Action<TabItem, int> bindItem { get; set; }Property Value
| Type | Description | 
|---|---|
| Action<TabItem, int> | 
contentContainer
The virtual content container of the Tabs.
Declaration
public override VisualElement contentContainer { get; }Property Value
| Type | Description | 
|---|---|
| VisualElement | 
Overrides
direction
The direction of the Tabs. Horizontal or Vertical.
Declaration
public Direction direction { get; set; }Property Value
| Type | Description | 
|---|---|
| Direction | 
emphasized
The emphasized mode of the Tabs.
Declaration
public bool emphasized { get; set; }Property Value
| Type | Description | 
|---|---|
| bool | 
itemContainer
The item container of the Tabs.
Declaration
public VisualElement itemContainer { get; }Property Value
| Type | Description | 
|---|---|
| VisualElement | 
items
The current list of items used to populate the Tabs.
Declaration
public IList items { get; }Property Value
| Type | Description | 
|---|---|
| IList | 
size
The size of the Tabs.
Declaration
public Size size { get; set; }Property Value
| Type | Description | 
|---|---|
| Size | 
sourceItems
Collection of items used to populate the Tabs.
Declaration
public IList sourceItems { get; set; }Property Value
| Type | Description | 
|---|---|
| IList | 
unbindItem
Method to unbind the TabItem.
Declaration
public Action<TabItem, int> unbindItem { get; set; }Property Value
| Type | Description | 
|---|---|
| Action<TabItem, int> | 
value
The value of the Tabs. This is the index of the selected TabItem.
Declaration
public int value { get; set; }Property Value
| Type | Description | 
|---|---|
| int | 
Methods
GetOrientationUssClassName(Direction)
Declaration
public static string GetOrientationUssClassName(Direction enumValue)Parameters
| Type | Name | Description | 
|---|---|---|
| Direction | enumValue | 
Returns
| Type | Description | 
|---|---|
| string | 
GetSizeUssClassName(Size)
Declaration
public static string GetSizeUssClassName(Size enumValue)Parameters
| Type | Name | Description | 
|---|---|---|
| Size | enumValue | 
Returns
| Type | Description | 
|---|---|
| string | 
GoToNext()
Go to the next TabItem.
Declaration
public bool GoToNext()Returns
| Type | Description | 
|---|---|
| bool | True if the next TabItem is selected, false otherwise. | 
GoToPrevious()
Go to the previous TabItem.
Declaration
public bool GoToPrevious()Returns
| Type | Description | 
|---|---|
| bool | True if the previous TabItem is selected, false otherwise. | 
SetValueWithoutNotify(int)
Set the value of the Tabs without notifying the change.
Declaration
public void SetValueWithoutNotify(int newValue)Parameters
| Type | Name | Description | 
|---|---|---|
| int | newValue | The new value. | 
Exceptions
| Type | Condition | 
|---|---|
| ValueOutOfRangeException | Throws if the value is out of range. |