Application.LeavingBackground Application.LeavingBackground Application.LeavingBackground Application.LeavingBackground Event

Definition

Occurs when the app moves from the background to the foreground.

public : 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
LeavingBackground_revoker LeavingBackground(auto_revoke_t, LeavingBackgroundEventHandler const& handler) const;
public event LeavingBackgroundEventHandler LeavingBackground
Public Event LeavingBackground As LeavingBackgroundEventHandler

Additional features and requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

The LeavingBackground event runs in the same apartment it was registered in.

See also