Back to results for “Shell Navigation”
.NET MAUI › Shell Navigation

How do you navigate between pages using Shell?

Beginner

Answer

Call Shell.Current.GoToAsync with a route. Absolute routes (starting //) reset the navigation stack to a registered top-level route; relative routes push onto the current stack. Routes are registered via Routing.RegisterRoute or implicitly by ShellContent.
await Shell.Current.GoToAsync("details");        // push
await Shell.Current.GoToAsync("//home");          // reset to root
await Shell.Current.GoToAsync("..");              // go back
Real-world example Tapping a list item pushes a details route, and a logout action uses //login to clear the stack and return to sign-in.

Common follow-ups: What's the difference between // and relative routes? | How do you go back?