-api-id | -api-type |
---|---|
E:Microsoft.UI.Dispatching.DispatcherQueue.ShutdownCompleted |
winrt event |
Raised when either ShutdownQueue or ShutdownQueueAsync is called. For a full list of the events raised, and in what order, see the Remarks for ShutdownQueueAsync.
The ShutdownCompleted event is raised from the event loop thread after the event loop has exited. You can use the handler for this event to clean up any state maintained by partner components that were maintained on the dedicated thread.
ShutdownQueueAsync, DispatcherQueue.TryEnqueue
// Invoked after the DispatcherQueue event loop exits.
_dispatcherQueue.ShutdownCompleted += (s, e) =>
{
// clean up state
};