AppWindow.Closing 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當視窗透過系統能供性關閉時發生。
// Register
event_token Closing(TypedEventHandler<AppWindow, AppWindowClosingEventArgs const&> const& handler) const;
// Revoke with event_token
void Closing(event_token const* cookie) const;
// Revoke with event_revoker
AppWindow::Closing_revoker Closing(auto_revoke_t, TypedEventHandler<AppWindow, AppWindowClosingEventArgs const&> const& handler) const;
public event TypedEventHandler<AppWindow,AppWindowClosingEventArgs> Closing;
function onClosing(eventArgs) { /* Your code */ }
appWindow.addEventListener("closing", onClosing);
appWindow.removeEventListener("closing", onClosing);
- or -
appWindow.onclosing = onClosing;
Public Custom Event Closing As TypedEventHandler(Of AppWindow, AppWindowClosingEventArgs)
事件類型
備註
呼叫 AppWindow.Destroy 方法時,不會發生此事件。