Exemple #1
0
        private void FrameNavigating(object sender, NavigatingCancelEventArgs e)
        {
            if (_isFastResume)
            {
                _isFastResume = false;
                var args = new FastResumeArgs(e.Uri);
                OnFastResume(args);

                if (args.ClearHistory)
                {
                    _clearHistory = true;
                }
                else if (args.PreserveLastOpenedPage)
                {
                    e.Cancel = true;
                }
                return;
            }
            if (DesignerProperties.IsInDesignTool || e.NavigationMode == NavigationMode.Back)
            {
                return;
            }

            var model = GetCurrentViewModel();
            if (model == null)
            {
                return;
            }
            var tombstoneManager = Container.Resolve<TombstoneManager>();
            tombstoneManager.SaveState(model);
        }
Exemple #2
0
 protected virtual void OnFastResume(FastResumeArgs args)
 {
 }