Example #1
0
        public async Task SuspendAsync()
        {
            this.LogInfo();

            Suspending?.Invoke(this, EventArgs.Empty);

            // save the navigation state
            await FrameLogic.SaveNavigationState(Id, _frame);

            // call the view-model's OnSuspending
            await SuspensionLogic.CallSuspendAsync(CurrentViewModel as ISuspensionAware);

            Suspended?.Invoke(this, EventArgs.Empty);
        }
Example #2
0
        public async Task ResumeAsync()
        {
            this.LogInfo();

            Resuming?.Invoke(this, EventArgs.Empty);

            // restore the navigation state
            await FrameLogic.LoadNavigationState(Id, _frame);

            // call the view-models OnResuming
            await SuspensionLogic.CallResumeAsync(CurrentViewModel as ISuspensionAware);

            Resumed?.Invoke(this, EventArgs.Empty);
        }