Suspending

Whereas killing is the rude and rare way for an app to stop running, suspending is the gentle and common way. Immediately before suspension occurs, Application’s Suspending event is raised. This is the time for an app to save any necessary session state, because it’s possible the app will be terminated (without any notification) before it ever runs again. This is also the time to release any files, devices, or other exclusive resources so other apps can use them while your app is suspended. (Remember that suspending an app just pauses it, much like pausing it in a debugger, so resources don’t get automatically released in this state unless they are treated specially by Windows.)

A user cannot directly suspend an app. Instead, an app ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.