コード例 #1
0
        private async Task RestoreLastViewOrGoToMain(ShellView shellView)
        {
            try
            {
                await SuspensionManager.RestoreAsync();
            }
            catch (SuspensionManagerException)
            {
            }

            SuspensionManager.RegisterFrame(shellView.ShellFrame, "MainFrame");

            if (shellView.ShellFrame.SourcePageType == null ||
                shellView.ShellFrame.SourcePageType == typeof(ErrorDialogView))
            {
                NavigationService.NavigateToViewModel <MainViewModel>();
            }
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: hyptechdev/SubSonic8
        private async Task RestoreLastViewOrGoToMain(ShellView shellView)
        {
            if (_previousExecutionState == ApplicationExecutionState.Terminated)
            {
                try
                {
                    await SuspensionManager.RestoreAsync();
                }
                catch (SuspensionManagerException)
                {
                }
            }

            SuspensionManager.RegisterFrame(shellView.ShellFrame, "MainFrame");

            if (shellView.ShellFrame.SourcePageType == null)
            {
                _navigationService.NavigateToViewModel<MainViewModel>();
            }
        }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: hyptechdev/SubSonic8
        private void BindShellViewModelToView(ShellView shellView)
        {
            _shellViewModel = Kernel.Get<IShellViewModel>();

            ViewModelBinder.Bind(_shellViewModel, shellView, null);
        }
コード例 #4
0
ファイル: ShellViewModel.cs プロジェクト: pirvudoru/SubSonic8
        private async Task RestoreLastViewOrGoToMain(ShellView shellView)
        {
            try
            {
                await SuspensionManager.RestoreAsync();
            }
            catch (SuspensionManagerException)
            {
            }

            SuspensionManager.RegisterFrame(shellView.ShellFrame, "MainFrame");

            if (shellView.ShellFrame.SourcePageType == null ||
                shellView.ShellFrame.SourcePageType == typeof(ErrorDialogView))
            {
                NavigationService.NavigateToViewModel<MainViewModel>();
            }
        }