DispatcherQueue.ShutdownCompleted Event

Definition

Raised when ShutdownQueueAsync is called. For a full list of the events raised, and in what order, see the Remarks for ShutdownQueueAsync.

// Register
event_token ShutdownCompleted(TypedEventHandler<DispatcherQueue, IInspectable const&> const& handler) const;

// Revoke with event_token
void ShutdownCompleted(event_token const* cookie) const;

// Revoke with event_revoker
DispatcherQueue::ShutdownCompleted_revoker ShutdownCompleted(auto_revoke_t, TypedEventHandler<DispatcherQueue, IInspectable const&> const& handler) const;
public event TypedEventHandler<DispatcherQueue,object> ShutdownCompleted;
function onShutdownCompleted(eventArgs) { /* Your code */ }
dispatcherQueue.addEventListener("shutdowncompleted", onShutdownCompleted);
dispatcherQueue.removeEventListener("shutdowncompleted", onShutdownCompleted);
- or -
dispatcherQueue.onshutdowncompleted = onShutdownCompleted;
Public Custom Event ShutdownCompleted As TypedEventHandler(Of DispatcherQueue, Object) 

Event Type

Examples

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

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.

Applies to