public void Navigate(NavigateMessage message) { switch (message.NavigateTo) { case NavigateTo.Search: _slideNavigator.GoTo(IndexOfSlide <SearchUserViewModel>()); break; case NavigateTo.Profile: var content = (UserSearch)message.Content; if (content.Url == (GameProfileViewModel.UserGameProfile?.Url ?? String.Empty)) { _slideNavigator.GoForward(); break; } _slideNavigator.GoTo(IndexOfSlide <GameProfileViewModel>(), async() => await GameProfileViewModel.Show((UserSearch)message.Content)); break; case NavigateTo.GameDetails: //TODO: GameDetails navigation here break; case NavigateTo.Forward: _slideNavigator.GoForward(); break; case NavigateTo.Back: _slideNavigator.GoBack(); break; default: throw new ArgumentOutOfRangeException(); } }
public NewAccountViewModel() { AddAccountCommand = new RelayCommand(() => { _accountSet.Accounts.Add((Account)Account.Clone()); }); GoBackCommand = new RelayCommand(() => { if (SlideNavigator == null) { return; } SlideNavigator.GoBack(); }); }
private void GoBackExecuted(object sender, ExecutedRoutedEventArgs e) { _slideNavigator.GoBack(); }