WebUIApplication.LeavingBackground 事件

定义

在应用即将离开后台和显示应用 UI 之前发生。

public:
 static event LeavingBackgroundEventHandler ^ LeavingBackground;
// Register
static event_token LeavingBackground(LeavingBackgroundEventHandler const& handler) const;

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

// Revoke with event_revoker
static WebUIApplication::LeavingBackground_revoker LeavingBackground(auto_revoke_t, LeavingBackgroundEventHandler const& handler) const;
public static event LeavingBackgroundEventHandler LeavingBackground;
function onLeavingBackground(eventArgs) { /* Your code */ }
Windows.UI.WebUI.WebUIApplication.addEventListener("leavingbackground", onLeavingBackground);
Windows.UI.WebUI.WebUIApplication.removeEventListener("leavingbackground", onLeavingBackground);
- or -
Windows.UI.WebUI.WebUIApplication.onleavingbackground = onLeavingBackground;
Public Shared Custom Event LeavingBackground As LeavingBackgroundEventHandler 

事件类型

Windows 要求

设备系列
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)

适用于