maui-shell-navigation

Implement and debug .NET MAUI Shell navigation with route registration and URI-based navigation.

Updated Nov 27, 2025
One-click install
npx skills add https://github.com/seydakaratekeli/KamPay3 --skill maui-shell-navigation-seydakaratekeli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-shell-navigation
Source: https://github.com/seydakaratekeli/KamPay3/tree/main/KamPay/.github/skills/maui-shell-navigation%20-%20Kopyala
Command: npx skills add https://github.com/seydakaratekeli/KamPay3 --skill maui-shell-navigation-seydakaratekeli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Helps developers implement and troubleshoot navigation in .NET MAUI Shell by clarifying visual hierarchy, route registration, URI-based navigation, query parameter passing, and back-navigation behaviors so navigation works reliably across pages.

Core Features & Use Cases

  • Visual hierarchy guidance: explains FlyoutItem, TabBar, Tab, ShellContent, and implicit wrapping rules to design a correct Shell structure.
  • Route registration and URI navigation: details when and how to use Routing.RegisterRoute, absolute versus relative routes, and reliable GoToAsync usage.
  • Parameter passing and navigation events: recommends IQueryAttributable and ShellNavigationQueryParameters for data transfer and shows the async deferral pattern for guarding navigation.
  • Use case: register a detail page outside the visual hierarchy and navigate to it with query parameters while handling unsaved changes on back navigation.

Quick Start

Ask how to register a route and navigate to an AnimalDetails page with query parameters using GoToAsync.

Frequently Asked Questions about maui-shell-navigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register a route and navigate to a page with query parameters in .NET MAUI Shell?

To navigate with query parameters in .NET MAUI Shell, register your detail page using Routing.RegisterRoute, then call GoToAsync with a URI and ShellNavigationQueryParameters to pass data to the target page.

What is the correct visual hierarchy for setting up a TabBar and Flyout menu in MAUI Shell?

MAUI Shell visual hierarchy is structured using FlyoutItem, TabBar, Tab, and ShellContent elements. These components define the navigation structure, with implicit wrapping rules applying when you omit certain hierarchy levels.

Why does GoToAsync fail when navigating to a page outside the Shell visual hierarchy?

GoToAsync fails for unregistered pages because the routing system cannot resolve the URI. You must explicitly register pages outside the visual hierarchy using Routing.RegisterRoute before attempting URI-based navigation.

Can I use IQueryAttributable to receive navigation parameters on a MAUI ContentPage?

Yes, implementing IQueryAttributable on your MAUI ContentPage allows it to receive query parameters passed via GoToAsync. Apply ShellNavigationQueryParameters to transfer data and the IQueryAttributable interface to extract it on arrival.

What's the best way to guard back navigation when users have unsaved changes in a MAUI app?

To guard back navigation with unsaved changes, apply the async deferral pattern for navigation checks. Handle navigation events to intercept the back action, verify state, and prompt users before allowing the Shell navigation to complete.

When should I use absolute versus relative routes in .NET MAUI Shell navigation?

Use absolute routes (starting with //) in MAUI Shell navigation to navigate to existing pages within the visual hierarchy, and relative routes to push new pages registered via Routing.RegisterRoute onto the current navigation stack.