Uno Navigation via XAML — Agent Skill
Reference Templates
For a complete, compilable Frame-based shell with parameterized placeholders, see:
references/shell-frame-template.md — Contains:
- SHELL_PAGE_NAME.xaml shell template
- Navigation.Request syntax reference
- Page template (XAML + code-behind)
- Route registration template
- Substitution rules
Workflow
Docs lookup: call
uno_platform_docs_search(...)first, thenuno_platform_docs_fetch(sourcePath="…")using thesourcePathfield from a result (a relative.mdpath; add the result'sanchorfor a section). Never pass a URL, a.htmllink, or a hand-built path.
Step 1: Fetch the XAML Navigation Documentation
uno_platform_docs_search("Uno Navigation XAML Navigation.Request Navigation.Data attached properties declarative")
Primary documentation pages:
- Navigate Using Attached Properties in XAML:
external/uno.extensions/doc/Learn/Navigation/Walkthrough/NavigateUsingAttachedPropertiesInXAML.md - XAML Navigation in Chefs:
external/uno.chefs/doc/navigation/XamlNavigation.md - Navigation Overview (XAML section):
external/uno.extensions/doc/Learn/Navigation/NavigationOverview.md
Fetch the main walkthrough:
uno_platform_docs_fetch(sourcePath="external/uno.extensions/doc/Learn/Navigation/Walkthrough/NavigateUsingAttachedPropertiesInXAML.md")
Step 2: For Chefs App Examples
For real-world XAML navigation patterns:
uno_platform_docs_fetch(sourcePath="external/uno.chefs/doc/navigation/XamlNavigation.md")
Step 3: For Qualifiers in XAML
If the user needs back-stack manipulation in XAML (like -/ to clear):
See the uno-navigation-qualifiers skill.
Key Principles (Stable)
- XAML namespace:
xmlns:uen="using:Uno.Extensions.Navigation.UI" uen:Navigation.Request="RouteName"triggers navigation on interaction (click/tap)uen:Navigation.Data="{Binding SomeData}"passes data with the navigation request- Works on Button, ListView, ItemsRepeater, and other interactive controls
- No Click event handler or code-behind needed
- Supports qualifier prefixes in the route string (e.g.,
-/Loginto clear back stack)
Navigation.Request Syntax
- Navigate forward:
uen:Navigation.Request="PageName"— pushes page onto the frame stack - Navigate and clear back stack:
uen:Navigation.Request="-/PageName"— replaces the current page - Navigate back:
uen:Navigation.Request="!back"— pops the current page - Navigate to nested region:
uen:Navigation.Request="./RegionName"— for visibility-based regions
Critical Rules
uen:Navigation.Requestis an attached property — it works on any UI element that supportsClickorTapped- Navigation happens via XAML only — no code-behind
INavigatorcalls needed for simple transitions - The
!backrequest navigates back in the frame stack - The
-/prefix clears the back stack (use for login-to-home transitions) - Route names in
RouteMapMUST match theuen:Navigation.Requestvalues used in XAML - Do NOT use
Region.Attached="True"insideShell.xaml— only inSHELL_PAGE_NAME.xaml - On secondary pages, always include a back button with
uen:Navigation.Request="!back"
Related Skills
- [[uno-navigation-code]] — Programmatic navigation alternative
- [[uno-navigation-qualifiers]] — Qualifier prefixes
- [[uno-navigation-routes]] — Route registration
- [[uno-navigation-data]] — Data passing patterns
- [[uno-navigation-tabbar]] — Alternative: bottom tab navigation for 3-5 pages
- [[uno-navigation-navigationview]] — Alternative: sidebar navigation for desktop