public NestedChildViewModel() { CloseCommand = new MvxAsyncCommand(async() => await NavigationService.Close(this)); PopToChildCommand = new MvxCommand(() => NavigationService.ChangePresentation(new MvxPopPresentationHint(typeof(ChildViewModel)))); PopToRootCommand = new MvxCommand(() => NavigationService.ChangePresentation(new MvxPopToRootPresentationHint())); RemoveCommand = new MvxCommand(() => NavigationService.ChangePresentation(new MvxRemovePresentationHint(typeof(SecondChildViewModel)))); }
public Tab3ViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { ShowRootViewModelCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <RootViewModel>()); CloseViewModelCommand = new MvxAsyncCommand(async() => await NavigationService.Close(this)); ShowPageOneCommand = new MvxCommand(() => NavigationService.ChangePresentation(new MvxPagePresentationHint(typeof(Tab1ViewModel)))); }
public Tab1ViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { OpenChildCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ChildViewModel>()); OpenModalCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ModalViewModel>()); OpenNavModalCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ModalNavViewModel>()); CloseCommand = new MvxAsyncCommand(async() => await NavigationService.Close(this)); OpenTab2Command = new MvxAsyncCommand(async() => await NavigationService.ChangePresentation(new MvxPagePresentationHint(typeof(Tab2ViewModel)))); }
public NestedChildViewModel(ILoggerFactory logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { CloseCommand = new MvxAsyncCommand(() => NavigationService.Close(this)); PopToChildCommand = new MvxAsyncCommand(() => NavigationService.ChangePresentation(new MvxPopPresentationHint(typeof(ChildViewModel)))); PopToRootCommand = new MvxAsyncCommand(() => NavigationService.ChangePresentation(new MvxPopToRootPresentationHint())); RemoveCommand = new MvxAsyncCommand(() => NavigationService.ChangePresentation(new MvxRemovePresentationHint(typeof(SecondChildViewModel)))); }
private async Task ShowSecletedTabViewModel(Type viewModelType) { if (viewModelType == typeof(DiscoverViewModel)) { await NavigationService.ChangePresentation(new MvxPagePresentationHint(typeof(DiscoverViewModel))); return; } if (viewModelType == typeof(FavoritesViewModel)) { await NavigationService.ChangePresentation(new MvxPagePresentationHint(typeof(FavoritesViewModel))); return; } }