LeavingBackgroundEventArgs Class

Definition

Gets the deferral object when the app is leaving the background state.

C#
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class LeavingBackgroundEventArgs : ILeavingBackgroundEventArgs
Inheritance
Object LeavingBackgroundEventArgs
Attributes
Implements

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

This object is passed to the app's leaving background event handler.

Tip

This event is raised before any UI is shown and is a good place to ensure that any assets that you load programmatically are ready so that the UI will be presented correctly.

Methods

GetDeferral()

Gets the deferral object which delays the transition from running in the background to running in the foreground until the app calls Deferral.Complete or the deadline for navigation has passed.

Applies to

Product Versions
WinRT Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

See also