Share via


AppWindow.Destroying Event

Definition

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

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.

Applies to

See also