共用方式為


DispatcherQueue.ShutdownCompleted 事件

定義

呼叫 ShutdownQueueAsync 時引發。 如需引發之事件的完整清單,以及依何種順序,請參閱 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事件。 您可以使用此事件的處理常式來清除在專用線程上維護的夥伴元件所維護的任何狀態。

適用於