/// <summary> /// Used to save the navigation stack and should be called in the suspending event. /// </summary> public async Task SaveAsync() { if (StateManager != null) { ProcessSuspend(); string frameKey = string.IsNullOrEmpty(_frameKey) ? PageNavigator.DefaultFrameKey : _frameKey; var frameDictionary = StateManager.GetDictionary(frameKey, true); frameDictionary[PageNavigator.NavigationStackKey] = NavigationFrame.GetNavigationState(); await StateManager.SaveAsync(); } }