Application.EnteredBackground Evento

Definição

Ocorre quando o aplicativo passa do primeiro plano para o segundo plano.

public:
 virtual event EnteredBackgroundEventHandler ^ EnteredBackground;
// Register
event_token EnteredBackground(EnteredBackgroundEventHandler const& handler) const;

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

// Revoke with event_revoker
Application::EnteredBackground_revoker EnteredBackground(auto_revoke_t, EnteredBackgroundEventHandler const& handler) const;
public event EnteredBackgroundEventHandler EnteredBackground;
function onEnteredBackground(eventArgs) { /* Your code */ }
application.addEventListener("enteredbackground", onEnteredBackground);
application.removeEventListener("enteredbackground", onEnteredBackground);
- or -
application.onenteredbackground = onEnteredBackground;
Public Custom Event EnteredBackground As EnteredBackgroundEventHandler 

Tipo de evento

Requisitos do Windows

Família de dispositivos
Windows 10 Anniversary Edition (introduzida na 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduzida na v3.0)

Comentários

Esse evento é acionado quando o usuário navega para longe do aplicativo. Há uma quantidade limitada de tempo que um manipulador de eventos para esse evento pode executar.

Quando o aplicativo é movido para segundo plano, as restrições de memória impostas pelo sistema podem mudar. Use esse evento para marcar seu consumo de memória atual e recursos livres para ficar abaixo do limite para que seu aplicativo não seja suspenso e possivelmente encerrado enquanto estiver em segundo plano. Confira Memória livre quando seu aplicativo for movido para o segundo plano para obter mais detalhes.

O evento EnteredBackground é executado no apartamento em que foi registrado.

Aplica-se a

Confira também