共用方式為


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。

適用於