Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.79 KB

appresourcegroupinfo_startsuspendasync_14116800.md

File metadata and controls

35 lines (23 loc) · 1.79 KB
-api-id -api-type
M:Windows.System.AppResourceGroupInfo.StartSuspendAsync
winrt method

Windows.System.AppResourceGroupInfo.StartSuspendAsync

-description

Initiate moving the associated app to the suspended state.

-returns

The result of trying to suspend the app.

-remarks

Calling this method on an app that is already suspended will return success.

This method initiates the standard workflow to move the app to the Suspended state. For example, on desktop this workflow includes minimizing the app. This will also include calling the app’s OnSuspending callback in the normal way, including honoring deferrals during suspension. This method will return as soon as it has initiated the suspension workflow, and not wait for the app to transition state or for it to run its OnSuspending method. Note that the app may take a long time to suspend, depending on deferrals.

You can call this method from any AppResourceGroupInfo, but only the one for the foreground app has a high probability of succeeding. Suspending the foreground app may result in suspending other resource groups for that app.

This method won’t work on ResourceGroups that relate to background tasks because they don’t have the concept of suspend/resume.

This method won’t work on Desktop Bridge apps because they don’t have the concept of suspend/resume.

-see-also

Handle app suspend

-examples

-capabilities

appDiagnostics