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 выполняется в той же квартире, в которой оно было зарегистрировано.

Применяется к

См. также раздел