-api-id | -api-type |
---|---|
M:Windows.ApplicationModel.LeavingBackgroundEventArgs.GetDeferral |
winrt method |
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.
The deferral object you will use to indicate that your processing is done.
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.