Occurs when the app is suspending.
public:
static event EventHandler<SuspendingEventArgs^ >^ Suspending {
EventRegistrationToken add (EventHandler<SuspendingEventArgs^ >^ value);
void remove (EventRegistrationToken token);
}
The suspend timeout for exclusive applications is one second. The suspend completion handler fires five seconds after a shared application becomes non-visible.
In the Suspending event handler, the game code should release any exclusive locks it may have on system-wide resources and save the game state. If the game has network connections open to other consoles or servers, then—depending on the nature of these connections—the game may also close these connections in the Suspending event handler. For example, in a multiplayer collaborative online game, the game should notify other players that a player is leaving the current game session as the game gets suspended.
See App States and White Papers - Process Lifetime Management for Xbox One for specific steps titles should take when being suspended.
Namespace: Windows.ApplicationModel.Core
Metadata: windows.winmd
White Papers - Process Lifetime Management for Xbox One
Windows.ApplicationModel.Core Namespace
CoreApplication.Resuming Event