DispatcherQueue.ShutdownCompleted 事件

定义

调用 ShutdownQueueShutdownQueueAsync 时引发。 有关引发的事件的完整列表和顺序,请参阅 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) 

事件类型

示例

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

注解

在事件循环退出,从事件循环线程引发 ShutdownCompleted 事件。 可以使用此事件的处理程序来清理在专用线程上维护的合作伙伴组件维护的任何状态。

适用于

另请参阅