Navigation
The Shell class defines the following navigation-related properties:
BackButtonBehavior
, of typeBackButtonBehavior
, an attached property that defines the behavior of the back button.CurrentItem
, of typeShellItem
, the currently selected item.CurrentPage
, of typePage
, the currently presented page.CurrentState
, of typeShellNavigationState
, the current navigation state of theShell
.Current
, of typeShell
, a type-casted alias forApplication.Current.MainPage
.
Navigation is performed by invoking the GoToAsync
method, from the Shell
class.
Routes
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
Last updated