Application.LeavingBackground Evento

Definición

Se produce cuando la aplicación se mueve del fondo al primer plano.

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 

Tipo de evento

Requisitos de Windows

Familia de dispositivos
Windows 10 Anniversary Edition (se introdujo en la versión 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (se introdujo en la versión v3.0)

Comentarios

El evento LeavingBackground se ejecuta en el mismo apartamento en el que se registró.

Se aplica a

Consulte también