I want to configure the restoration of the application from the point from which the application was terminated by the system, but an error occurs, I have a two-page application, if on the main page I’ve played the system’s application stop, then everything is fine, but with the second page there is an error
I do a training video, in their example everything is fine, in my analogy there is no https://mva.microsoft.com/ru/training-courses/-windows-10-15867?l=wg7YwPv7B_205192797 17:11 time
part of the code where the error occurs
private void OnSuspending(object sender, SuspendingEventArgs e) { var deferral = e.SuspendingOperation.GetDeferral(); //TODO: Сохранить состояние приложения и остановить все фоновые операции Frame frame = Window.Current.Content as Frame; *ApplicationData.Current.LocalSettings.Values["NavigationState"] = frame.GetNavigationState();* deferral.Complete(); } 