Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides implementing Shell-based navigation in .NET MAUI apps, covering routes, tabs, flyouts, GoToAsync and query parameters.
Use this skill ↓82% 95%+14 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 18 of 22 without it.
In my AppShell.xaml, I have three ShellContent elements inside a TabBar without any route attributes set. Why is relying on default generated routes dangerous for absolute navigation, and how should I fix the XAML markup?
Explains that default generated routes yield non-deterministic D_FAULT route names
3 of 3 safety checks passed
Implement page navigation in .NET MAUI apps using Shell. Shell provides URI-based navigation, a flyout menu, tab bars, and a four-level visual hierarchy — all configured declaratively in XAML.
GoToAsyncmaui-data-bindingmaui-dependency-injectionNavigationPage without Shell (different navigation API)AppShell.xaml as the root shellContentPage) to navigate betweenThese are the Shell-specific decisions that are easy to get wrong. Apply them whenever they are relevant to what the user asked.
| Situation | Do this | Not this |
|---|---|---|
Declaring pages in AppShell.xaml | With xmlns:views="clr-namespace:MyApp.Views" declared: <ShellContent ContentTemplate="{DataTemplate views:MyPage}" /> — the page is created on first navigation | <ShellContent><views:MyPage /></ShellContent>, which constructs every page at startup |
| Navigating to a page not in the visual hierarchy | Routing.RegisterRoute("details", typeof(DetailsPage)) first | Calling GoToAsync("details") unregistered — it throws at runtime |
| Receiving navigation parameters | Implement IQueryAttributable on the ViewModel | Implementing it on the Page, which splits state from the BindingContext |
| Passing a whole object | ShellNavigationQueryParameters | Serialising the object into the query string |
Any GoToAsync call | await it | Fire-and-forget — exceptions are swallowed and navigation races |
| Confirming before back navigation | ShellNavigatingEventArgs.GetDeferral() … deferral.Complete() | Blocking synchronously on the dialog task |
| Detecting back navigation | Check e.Source == ShellNavigationSource.Pop | Assuming every navigation is a back action |
Published skills whose descriptions closely match this one, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.