Class NavHost
The NavHost is the UI element that manages the navigation stack. It will manage the display of NavigationScreen objects through its NavController.
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.Navigation
Assembly: Unity.AppUI.Navigation.dll
Syntax
public class NavHost : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle
Constructors
NavHost()
Default constructor.
Declaration
public NavHost()
Fields
containerUssClassName
The NavHost container styling class.
Declaration
public const string containerUssClassName = "appui-navhost__container"
Field Value
Type | Description |
---|---|
string |
itemContainerUssClassName
The NavHost item container styling class.
Declaration
public const string itemContainerUssClassName = "appui-navhost__item__container"
Field Value
Type | Description |
---|---|
string |
itemUssClassName
The NavHost item styling class.
Declaration
public const string itemUssClassName = "appui-navhost__item"
Field Value
Type | Description |
---|---|
string |
ussClassName
The NavHost main styling class.
Declaration
public const string ussClassName = "appui-navhost"
Field Value
Type | Description |
---|---|
string |
withRailUssClassName
The NavHost item with rail styling class.
Declaration
public const string withRailUssClassName = "appui-navhost__item--with-rail--"
Field Value
Type | Description |
---|---|
string |
Properties
contentContainer
The container that will hold the current NavigationScreen.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
makeScreen
Method called to create a new instance of a NavigationScreen based on a given type.
Declaration
public Func<Type, NavigationScreen> makeScreen { get; set; }
Property Value
Type | Description |
---|---|
Func<Type, NavigationScreen> |
navController
The controller that manages the navigation stack.
Declaration
public NavController navController { get; }
Property Value
Type | Description |
---|---|
NavController |
visualController
The visual controller that will be used to handle modification of Navigation visual elements, such as BottomNavBar.
Declaration
public INavVisualController visualController { get; set; }
Property Value
Type | Description |
---|---|
INavVisualController |