Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.21 KB

dispatcherqueue_shutdowncompleted.md

File metadata and controls

32 lines (22 loc) · 1.21 KB
-api-id -api-type
E:Microsoft.UI.Dispatching.DispatcherQueue.ShutdownCompleted
winrt event

Microsoft.UI.Dispatching.DispatcherQueue.ShutdownCompleted

-description

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.

-remarks

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.

-see-also

ShutdownQueueAsync, DispatcherQueue.TryEnqueue

-examples

// Invoked after the DispatcherQueue event loop exits.
_dispatcherQueue.ShutdownCompleted += (s, e) =>
{
    // clean up state
};