DispatcherQueue.ShutdownCompleted Event

Definition

Fires after the DispatcherQueue event loop stops which is the last step in the DispatcherQueue shutdown process.

// 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;
Public Custom Event ShutdownCompleted As TypedEventHandler(Of DispatcherQueue, Object) 

Event Type

Windows.Foundation.TypedEventHandler<DispatcherQueue,Object>

Examples

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

Remarks

The event is fired on the thread running the DispatcherQueue event loop. After this event is fired, any work posted to the DispatcherQueue will not be scheduled.

Applies to