# Navigation

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.

#### Routes <a href="#routes" id="routes"></a>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dailyjournal.gitbook.io/notes/app-frameworks/.net-maui/navigation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
