Navigation
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
The Shell class defines the following navigation-related properties:
BackButtonBehavior
, of type BackButtonBehavior
, an attached property that defines the behavior of the back button.
CurrentItem
, of type ShellItem
, the currently selected item.
CurrentPage
, of type Page
, the currently presented page.
CurrentState
, of type ShellNavigationState
, the current navigation state of the Shell
.
Current
, of type Shell
, a type-casted alias for Application.Current.MainPage
.
Navigation is performed by invoking the GoToAsync
method, from the Shell
class.
Navigation is performed in a Shell app by specifying a URI to navigate to. Navigation URIs can have three components:
A route, which defines the path to content that exists as part of the Shell visual hierarchy.
A page. Pages that don't exist in the Shell visual hierarchy can be pushed onto the navigation stack from anywhere within a Shell app. For example, a details page won't be defined in the Shell visual hierarchy, but can be pushed onto the navigation stack as required.
One or more query parameters. Query parameters are parameters that can be passed to the destination page while navigating.
When a navigation URI includes all three components, the structure is: //route/page?queryParameters