🔹 Navigation Class
namespace NoesisApp
Provides attached properties that transform a ContentControl into a stack-based navigation region.
By assigning a NavDestination collection, the control automatically tracks navigation history and facilitates seamless transitions between multiple views. You can trigger these transitions using NavigateToAction and NavigateBackAction.
Usage example:
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:noesis="clr-namespace:NoesisGUIExtensions">
<!-- The Navigation Root -->
<ContentControl x:Name="MainRegion">
<!-- Define available screens -->
<noesis:Navigation.Destinations>
<noesis:NavDestination Id="SettingsScreen"
Content="{Binding SettingsViewModel}"
ContentTemplate="{StaticResource SettingsViewTemplate}" />
<noesis:NavDestination Id="ProfileScreen"
Content="{Binding ProfileViewModel}"
ContentTemplate="{StaticResource ProfileViewTemplate}" />
</noesis:Navigation.Destinations>
<!-- The initial landing screen -->
<ContentControl.Content>
<StackPanel>
<TextBlock Text="Home Screen" />
<Button Content="Go to Settings">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Click">
<!-- Navigates forward to the Settings screen -->
<noesis:NavigateToAction DestinationId="SettingsScreen" />
</b:EventTrigger>
</b:Interaction.Triggers>
</Button>
<Button Content="View Profile">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Click">
<!-- Navigates forward to the Profile screen -->
<noesis:NavigateToAction DestinationId="ProfileScreen"/>
</b:EventTrigger>
</b:Interaction.Triggers>
</Button>
</StackPanel>
</ContentControl.Content>
</ContentControl>
</Grid>
Properties
Navigation has no properties
Attached Properties
| Name | Description |
|---|---|
| ◆ Destinations | Gets or sets the collection of available navigation destinations for this control. Setting this property automatically initializes the control as a navigation root. |
Methods
Navigation has no methods
Events
Navigation has no events
📍 On this page