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
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 | 
Events
enteredDestination
Event that is triggered when a new destination is entered.
Declaration
public event Action<NavController, NavDestination, Argument[]> enteredDestination
  Event Type
| Type | Description | 
|---|---|
| Action<NavController, NavDestination, Argument[]> | 
exitedDestination
Event that is triggered when a destination is exited.
Declaration
public event Action<NavController, NavDestination, Argument[]> exitedDestination
  Event Type
| Type | Description | 
|---|---|
| Action<NavController, NavDestination, Argument[]> |