docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NavigationScreen

    Base class for all navigation screens that implements the INavigationScreen interface. A navigation screen is a VisualElement that can be pushed to a NavHost.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    NavigationScreen
    Implements
    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    INavigationScreen
    Inherited Members
    VisualElement.disabledUssClassName
    VisualElement.ExecuteDefaultAction(EventBase)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    VisualElement.resolvedStyle
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    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)
    CallbackEventHandler.HandleEvent(EventBase)
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.Navigation
    Assembly: Unity.AppUI.Navigation.dll
    Syntax
    public class NavigationScreen : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, INavigationScreen

    Constructors

    NavigationScreen()

    Base Constructor.

    Declaration
    public NavigationScreen()
    See Also
    INavigationScreen

    Fields

    appBarUssClassName

    The NavigationScreen app bar styling class.

    Declaration
    public const string appBarUssClassName = "appui-navigation-screen__app-bar"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    bottomNavBarUssClassName

    The NavigationScreen bottom nav bar styling class.

    Declaration
    public const string bottomNavBarUssClassName = "appui-navigation-screen__bottom-nav-bar"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    containerUssClassName

    The NavigationScreen container styling class.

    Declaration
    public const string containerUssClassName = "appui-navigation-screen__container"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    drawerUssClassName

    The NavigationScreen drawer styling class.

    Declaration
    public const string drawerUssClassName = "appui-navigation-screen__drawer"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    leftContainerUssClassName

    The NavigationScreen left container styling class.

    Declaration
    public const string leftContainerUssClassName = "appui-navigation-screen__left-container"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    navigationRailUssClassName

    The NavigationScreen navigation rail styling class.

    Declaration
    public const string navigationRailUssClassName = "appui-navigation-screen__navigation-rail"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    rightContainerUssClassName

    The NavigationScreen right container styling class.

    Declaration
    public const string rightContainerUssClassName = "appui-navigation-screen__right-container"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    ussClassName

    The NavigationScreen main styling class.

    Declaration
    public const string ussClassName = "appui-navigation-screen"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    withAppBarUssClassName

    The NavigationScreen with app bar styling class.

    Declaration
    public const string withAppBarUssClassName = "appui-navigation-screen--with-appbar"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    withBottomNavBarUssClassName

    The NavigationScreen with bottom nav bar styling class.

    Declaration
    public const string withBottomNavBarUssClassName = "appui-navigation-screen--with-bottom-nav-bar"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    withCompactAppBarUssClassName

    The NavigationScreen with compact app bar styling class.

    Declaration
    public const string withCompactAppBarUssClassName = "appui-navigation-screen--with-appbar--compact"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    withDrawerUssClassName

    The NavigationScreen with drawer styling class.

    Declaration
    public const string withDrawerUssClassName = "appui-navigation-screen--with-drawer--"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    withRailUssClassName

    The NavigationScreen with rail styling class.

    Declaration
    public const string withRailUssClassName = "appui-navigation-screen--with-rail--"
    Field Value
    Type Description
    string
    See Also
    INavigationScreen

    Properties

    appBar

    The AppBar that will be used to display the app bar of the screen.

    Declaration
    public AppBar appBar { get; }
    Property Value
    Type Description
    AppBar
    See Also
    INavigationScreen

    bottomNavBar

    The BottomNavBar that will be used to display the bottom navigation items of the screen.

    Declaration
    public BottomNavBar bottomNavBar { get; }
    Property Value
    Type Description
    BottomNavBar
    See Also
    INavigationScreen

    contentContainer

    Child elements are added to this element.

    Declaration
    public override VisualElement contentContainer { get; }
    Property Value
    Type Description
    VisualElement
    Overrides
    VisualElement.contentContainer
    See Also
    INavigationScreen

    drawer

    The Drawer that will be used to display the drawer of the screen.

    Declaration
    public Drawer drawer { get; }
    Property Value
    Type Description
    Drawer
    See Also
    INavigationScreen

    navigationRail

    The NavigationRail that will be used to display the navigation items of the screen.

    Declaration
    public NavigationRail navigationRail { get; }
    Property Value
    Type Description
    NavigationRail
    See Also
    INavigationScreen

    scrollView

    The ScrollView that will be used to display the content of the screen.

    Declaration
    public ScrollView scrollView { get; }
    Property Value
    Type Description
    ScrollView
    See Also
    INavigationScreen

    showAppBar

    Display the bottom navigation bar on this screen.

    Declaration
    public bool showAppBar { get; set; }
    Property Value
    Type Description
    bool
    See Also
    INavigationScreen

    showBackButton

    Display the drawer on this screen.

    Declaration
    public bool showBackButton { get; set; }
    Property Value
    Type Description
    bool
    See Also
    INavigationScreen

    showBottomNavBar

    Display the navigation rail on this screen.

    Declaration
    public bool showBottomNavBar { get; set; }
    Property Value
    Type Description
    bool
    See Also
    INavigationScreen

    showDrawer

    Display the drawer on this screen.

    Declaration
    public bool showDrawer { get; set; }
    Property Value
    Type Description
    bool
    See Also
    INavigationScreen

    showNavigationRail

    Display the navigation rail on this screen.

    Declaration
    public bool showNavigationRail { get; set; }
    Property Value
    Type Description
    bool
    See Also
    INavigationScreen

    Methods

    OnEnter(NavController, NavDestination, Argument[])

    Called when the screen is pushed to a NavHost.

    Declaration
    public virtual void OnEnter(NavController controller, NavDestination destination, Argument[] args)
    Parameters
    Type Name Description
    NavController controller

    The NavController that manages the navigation stack.

    NavDestination destination

    The NavDestination associated with this screen.

    Argument[] args

    The arguments associated with this screen.

    See Also
    INavigationScreen

    OnExit(NavController, NavDestination, Argument[])

    Called when the screen is popped from a NavHost.

    Declaration
    public virtual void OnExit(NavController controller, NavDestination destination, Argument[] args)
    Parameters
    Type Name Description
    NavController controller

    The NavController that manages the navigation stack.

    NavDestination destination

    The NavDestination associated with this screen.

    Argument[] args

    The arguments associated with this screen.

    Remarks

    This method is called before the screen is removed from the NavHost.

    See Also
    INavigationScreen

    SetupAppBar(AppBar, NavController)

    Implement this method to setup the AppBar of this screen specifically.

    Declaration
    protected virtual void SetupAppBar(AppBar appBar, NavController controller)
    Parameters
    Type Name Description
    AppBar appBar

    The AppBar to setup.

    NavController controller

    The NavController that manages the navigation stack.

    Remarks

    To setup the AppBar globally, use SetupAppBar(AppBar, NavDestination, NavController) in your implementation of INavVisualController.

    See Also
    INavigationScreen

    SetupBottomNavBar(BottomNavBar, NavController)

    Implement this method to setup the BottomNavBar of this screen specifically.

    Declaration
    protected virtual void SetupBottomNavBar(BottomNavBar bottomNavBar, NavController controller)
    Parameters
    Type Name Description
    BottomNavBar bottomNavBar

    The BottomNavBar to setup.

    NavController controller

    The NavController that manages the navigation stack.

    Remarks

    To setup the BottomNavBar globally, use SetupBottomNavBar(BottomNavBar, NavDestination, NavController) in your implementation of INavVisualController.

    See Also
    INavigationScreen

    SetupDrawer(Drawer, NavController)

    Implement this method to setup the Drawer of this screen specifically.

    Declaration
    protected virtual void SetupDrawer(Drawer drawer, NavController controller)
    Parameters
    Type Name Description
    Drawer drawer

    The Drawer to setup.

    NavController controller

    The NavController that manages the navigation stack.

    Remarks

    To setup the Drawer globally, use SetupDrawer(Drawer, NavDestination, NavController) in your implementation of INavVisualController.

    See Also
    INavigationScreen

    SetupNavigationRail(NavigationRail, NavController)

    Implement this method to setup the NavigationRail of this screen specifically.

    Declaration
    protected virtual void SetupNavigationRail(NavigationRail navigationRail, NavController controller)
    Parameters
    Type Name Description
    NavigationRail navigationRail

    The NavigationRail to setup.

    NavController controller

    The NavController that manages the navigation stack.

    Remarks

    To setup the NavigationRail globally, use SetupNavigationRail(NavigationRail, NavDestination, NavController) in your implementation of INavVisualController.

    See Also
    INavigationScreen

    Implements

    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    INavigationScreen

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    RegisterUpdateCallbackExtensions.RegisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    RegisterUpdateCallbackExtensions.UnregisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    VisualElementExtensions.EnableDynamicTransform(VisualElement, bool)
    VisualElementExtensions.EnablePicking(VisualElement, bool)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContextProvider<T>(VisualElement, string)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement, string)
    VisualElementExtensions.GetExclusiveRootElement(VisualElement)
    VisualElementExtensions.GetLastAncestorOfType<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement, string)
    VisualElementExtensions.GetTooltipContent(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.HasAncestorsOfType<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement, string)
    VisualElementExtensions.IsInvisible(VisualElement)
    VisualElementExtensions.IsOnScreen(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, string, T)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipContent(VisualElement, VisualElementExtensions.TooltipContentCallback)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)

    See Also

    INavigationScreen
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)