共用方式為


AppWindow.Destroying 事件

定義

當視窗損毀時發生。

// 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) 

事件類型

備註

事件會在視窗從畫面中移除之後傳送。 使用此事件來清除與視窗相關聯的資源。

適用於

另請參閱