Class NavigationRailItem
A NavigationRailItem is a selectable item in a NavigationRail.
Implements
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class NavigationRailItem : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IPressable, ISelectableElement
Constructors
NavigationRailItem()
Default constructor.
Declaration
public NavigationRailItem()
Fields
iconUssClassName
Icon styling class for the NavigationRailItem.
Declaration
public const string iconUssClassName = "appui-navigation-rail-item__icon"
Field Value
Type | Description |
---|---|
string |
labelUssClassName
Label styling class for the NavigationRailItem.
Declaration
public const string labelUssClassName = "appui-navigation-rail-item__label"
Field Value
Type | Description |
---|---|
string |
ussClassName
Main styling class for the NavigationRailItem.
Declaration
public const string ussClassName = "appui-navigation-rail-item"
Field Value
Type | Description |
---|---|
string |
Properties
clickable
Clickable Manipulator for this NavigationRailItem.
Declaration
public Pressable clickable { get; }
Property Value
Type | Description |
---|---|
Pressable |
icon
The icon of the NavigationRailItem.
Declaration
public string icon { get; set; }
Property Value
Type | Description |
---|---|
string |
label
The label of the NavigationRailItem.
Declaration
public string label { get; set; }
Property Value
Type | Description |
---|---|
string |
selected
Whether the NavigationRailItem is in selected state.
Declaration
public bool selected { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
SetSelectedWithoutNotify(bool)
Set the selected state of a UI element without sending an event through the visual tree.
Declaration
public void SetSelectedWithoutNotify(bool newValue)
Parameters
Type | Name | Description |
---|---|---|
bool | newValue | The new selected state value. |