Application.LeavingBackground イベント

定義

アプリがバックグラウンドからフォアグラウンドに移動したときに発生します。

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

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

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

イベントの種類

Windows の要件

デバイス ファミリ
Windows 10 Anniversary Edition (10.0.14393.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v3.0 で導入)

注釈

LeavingBackground イベントは、登録されたのと同じアパートメントで実行されます。

適用対象

こちらもご覧ください