LeavingBackgroundEventArgs
LeavingBackgroundEventArgs
LeavingBackgroundEventArgs
LeavingBackgroundEventArgs
Class
Definition
Gets the deferral object when the app is leaving the background state.
public : sealed class LeavingBackgroundEventArgs : ILeavingBackgroundEventArgspublic sealed class LeavingBackgroundEventArgs : ILeavingBackgroundEventArgsPublic NotInheritable Class LeavingBackgroundEventArgs Implements ILeavingBackgroundEventArgs// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
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() 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.
The deferral object you will use to indicate that your processing is done.
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.