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))));
 }
示例#2
0
        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))));
 }
示例#4
0
 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))));
 }
示例#5
0
        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;
            }
        }