Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

NavigationCommands

Mark Smith edited this page Sep 2, 2016 · 1 revision

NavigationCommands

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.

Properties

  • NavigateToCommand : an ICommand which uses the INavigationService to navigate to the passed page key.
  • NavigateBackCommand: an ICommand which uses the INavigationService to navigate backwards.

Example

<Button Text="About" 
        Command="{x:Static cmds:NavigationCommands.NavigateToCommand}"
        CommandParameter="aboutPageKey" />
...
<Button Text="Go Back"
        Command="{x:Static cmds:NavigationCommands.NavigateBackCommand}" />