Class StackViewItem
An item in a StackView. It is a container for any UI element and must be used inside a StackView.
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class StackViewItem : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle
Constructors
StackViewItem(VisualElement)
Default constructor.
Declaration
public StackViewItem(VisualElement item)
Parameters
| Type | Name | Description |
|---|---|---|
| VisualElement | item | The content to add to the StackViewItem. |
Fields
ussClassName
The main styling class of the StackViewItem. This is the class that is used in the USS file.
Declaration
public static readonly string ussClassName
Field Value
| Type | Description |
|---|---|
| string |
Properties
index
The index of the item in the stack.
Declaration
public int index { get; }
Property Value
| Type | Description |
|---|---|
| int |
status
The status of the item in the stack.
Declaration
public StackViewItemStatus status { get; }
Property Value
| Type | Description |
|---|---|
| StackViewItemStatus |
view
The StackView that contains this item.
Declaration
public StackView view { get; }
Property Value
| Type | Description |
|---|---|
| StackView |
Events
activated
This event is emitted when the item is activated in the stack.
Declaration
public event Action activated
Event Type
| Type | Description |
|---|---|
| Action |
activating
This event is emitted when the item is in the process of being activated in the stack.
Declaration
public event Action activating
Event Type
| Type | Description |
|---|---|
| Action |
deactivated
This event is emitted when the item is deactivated in the stack.
Declaration
public event Action deactivated
Event Type
| Type | Description |
|---|---|
| Action |
deactivating
This event is emitted when the item is in the process of being deactivated in the stack.
Declaration
public event Action deactivating
Event Type
| Type | Description |
|---|---|
| Action |
removed
This event is emitted when the item has been removed from the stack. It can be used to safely destroy extra data for example.
Declaration
public event Action removed
Event Type
| Type | Description |
|---|---|
| Action |