AppWindow.Destroying Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when a window is being destroyed.
// 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)
Event Type
TypedEventHandler<AppWindow,IInspectable>
Remarks
The event is sent after the window has been removed from screen. Use this event to do clean up of resources associated with the window.