ILeavingBackgroundEventArgs ILeavingBackgroundEventArgs ILeavingBackgroundEventArgs ILeavingBackgroundEventArgs Interface

Definition

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

public : interface ILeavingBackgroundEventArgspublic interface ILeavingBackgroundEventArgsPublic Interface ILeavingBackgroundEventArgs// You can use this interface in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

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() GetDeferral() GetDeferral() 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.

public : Deferral GetDeferral()public Deferral GetDeferral()Public Function GetDeferral() As Deferral// You can use this method in JavaScript.
Returns

The deferral object you will use to indicate that your processing is complete.

Remarks

Deferrals are important if you call asynchronous methods from your event handler. Without the deferral, the app transitions to the next state when the event handler returns— which may happen before your asynchronous method has finished.