語言

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) 

事件類型

備註

事件是在視窗從螢幕移除後才發送的。 利用這個事件來清理與窗戶相關的資源。

適用於

另請參閱