CoreApplication.Exiting 事件

定义

在关闭应用时发生。

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

事件类型

注解

Windows Phone 8

此 API 仅在本机应用中受支持。

适用于