DispatcherQueue.ShutdownCompleted Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
// 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
TypedEventHandler<DispatcherQueue,IInspectable>
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.