CoreApplication.LeavingBackground CoreApplication.LeavingBackground CoreApplication.LeavingBackground CoreApplication.LeavingBackground Event

Definition

Fired just before application UI becomes visible.

public : event EventHandler<LeavingBackgroundEventArgs> LeavingBackground
// Register
event_token LeavingBackground(EventHandler<LeavingBackgroundEventArgs> const& handler) const;

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

// Revoke with event_revoker
LeavingBackground_revoker LeavingBackground(auto_revoke_t, EventHandler<LeavingBackgroundEventArgs> const& handler) const;
public event EventHandler<LeavingBackgroundEventArgs> LeavingBackground
Public Event LeavingBackground As EventHandler (Of LeavingBackgroundEventArgs)

Remarks

Previously the best location to load UI was in your activated or resuming event handler. Now your handler for the LeavingBackground event is the best place to do your final checks to ensure that the UI is ready for presentation. It is important to check that visual assets are ready by this time because this is the last opportunity to do work before your application is visible to the user.

See also