forked from xamarinhq/xamu-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
NavigationCommands
Mark Smith edited this page Sep 2, 2016
·
1 revision
The NavigationCommands
static class has public static properties to allow you to utilize the built-in navigation commands. These allow you to wire up simple navigation directly in XAML without any code-behind or View Model logic being invoked.
-
NavigateToCommand
: anICommand
which uses theINavigationService
to navigate to the passed page key. -
NavigateBackCommand
: anICommand
which uses theINavigationService
to navigate backwards.
<Button Text="About"
Command="{x:Static cmds:NavigationCommands.NavigateToCommand}"
CommandParameter="aboutPageKey" />
...
<Button Text="Go Back"
Command="{x:Static cmds:NavigationCommands.NavigateBackCommand}" />