AppWindow.Destroying 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當窗戶被破壞時會發生。
// Register
event_token Destroying(TypedEventHandler<AppWindow, IInspectable const&> const& handler) const;
// Revoke with event_token
void Destroying(event_token const* cookie) const;
// Revoke with event_revoker
AppWindow::Destroying_revoker Destroying(auto_revoke_t, TypedEventHandler<AppWindow, IInspectable const&> const& handler) const;
public event TypedEventHandler<AppWindow,object> Destroying;
function onDestroying(eventArgs) { /* Your code */ }
appWindow.addEventListener("destroying", onDestroying);
appWindow.removeEventListener("destroying", onDestroying);
- or -
appWindow.ondestroying = onDestroying;
Public Custom Event Destroying As TypedEventHandler(Of AppWindow, Object)
事件類型
TypedEventHandler<AppWindow,IInspectable>
備註
事件是在視窗從螢幕移除後才發送的。 利用這個事件來清理與窗戶相關的資源。