我在使用WinRT在Windows Phone 8.1上暂停事件时遇到问题,它不会触发.我不知道为什么.这是我的代码:
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
InitializeComponent();
Suspending += OnSuspending;
#if DEBUG
this.displayRequest = new DisplayRequest();
#endif
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory …Run Code Online (Sandbox Code Playgroud)