WebUIApplication.Activated WebUIApplication.Activated WebUIApplication.Activated WebUIApplication.Activated WebUIApplication.Activated Event

Definition

Occurs when the app is activated.

public : event ActivatedEventHandler Activated
// Register
event_token Activated(ActivatedEventHandler const& handler) const;

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

// Revoke with event_revoker
Activated_revoker Activated(auto_revoke_t, ActivatedEventHandler const& handler) const;
public event ActivatedEventHandler Activated
Public Event Activated As ActivatedEventHandler
function onActivated(eventArgs){/* Your code */}


webuiApplication.addEventListener("activated", onActivated);
webuiApplication.removeEventListener("activated", onActivated);

Remarks

Whenever your app is launched, the activated event is raised. This event can also be raised while your app is running if the system needs to pass the app parameters related to a new activation contract. You can use the activated event to restore the previous state of your app and to retrieve the activation parameters related to the contract for which your app is being activated. For a full list of the activation contracts and more details on their parameters see the ActivationKind enumeration. Note that you can also use the WinJS Onactivated event to handle app activation.

Note

: If your app needs to navigate the top level document for any reason you must first complete activation before attempting to do the top level navigation. If you attempt a top level navigation before activation completes your app will crash. This ensures that your app and the system are in a consistent state before the JavaScript context is torn down and recreated during the navigation.

See Also