forked from xamarinhq/xamu-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
NavigationToCommand
Mark Smith edited this page Sep 2, 2016
·
2 revisions
The NavigationToCommand is an ICommand implementation that uses the registered INavigationService to perform a NavigateAsync to the passed page key parameter. If no parameter is passed, the command will not execute.
Note: This class cannot be instantiated on it's own. Instead, a single instance of the command is exposed through a static property on the NavigationCommands class. You should use this property to execute the command.
<ContentPage ... xmlns:cmds="XamarinUniversity.Commands;assembly=XamU.Infrastructure" ...>
...
<Button Text="About"
Command="{x:Static cmds:NavigationCommands.NavigateToCommand}"
CommandParameter="aboutPageKey" />