Delen via


CoreApplication.Exiting Event

Definition

Occurs when the app is shutting down.

// Register
static event_token Exiting(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
static void Exiting(event_token const* cookie) const;

// Revoke with event_revoker
static CoreApplication::Exiting_revoker Exiting(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> Exiting;
function onExiting(eventArgs) { /* Your code */ }
Windows.ApplicationModel.Core.CoreApplication.addEventListener("exiting", onExiting);
Windows.ApplicationModel.Core.CoreApplication.removeEventListener("exiting", onExiting);
- or -
Windows.ApplicationModel.Core.CoreApplication.onexiting = onExiting;
Public Shared Custom Event Exiting As EventHandler(Of Object) 

Event Type

Remarks

Windows Phone 8

This API is supported in native apps only.

Applies to