Exemplo n.º 1
0
 // The command that is processed when a navigation button is clicked
 public Command NavigateToViewModel(int clickedButtonNum)
 {
     // Note that unlike using Application.Current.MainPage.Navigation.PushAsync(), we can pass in a view model instead of a page, as _ViewNavigator uses our ViewFactory implementation
     // This makes for much better view and view model coupling!
     return
         (new Command(async() => await _viewModelNavigator.PushAsync(_viewModelsICanNavigateTo[clickedButtonNum])));
 }