AppInstance.Activated Event

Definition

Raised for activations that have been redirected via Microsoft.Windows.AppLifecycle.AppInstance.RedirectActivationToAsync.

/// [Windows.Foundation.Metadata.Experimental]
/// [add: Windows.Foundation.Metadata.Experimental]
/// [remove: Windows.Foundation.Metadata.Experimental]
// Register
event_token Activated(EventHandler<AppActivationArguments> const& handler) const;

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

// Revoke with event_revoker
AppInstance::Activated_revoker Activated(auto_revoke_t, EventHandler<AppActivationArguments> const& handler) const;
// Register
event_token Activated(EventHandler<AppActivationArguments> const& handler) const;

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

// Revoke with event_revoker
AppInstance::Activated_revoker Activated(auto_revoke_t, EventHandler<AppActivationArguments> const& handler) const;
[Windows.Foundation.Metadata.Experimental]
[add: Windows.Foundation.Metadata.Experimental]
[remove: Windows.Foundation.Metadata.Experimental]
public event System.EventHandler<AppActivationArguments> Activated;
public event System.EventHandler<AppActivationArguments> Activated;
function onActivated(eventArgs) { /* Your code */ }
appInstance.addEventListener("activated", onActivated);
appInstance.removeEventListener("activated", onActivated);
- or -
appInstance.onactivated = onActivated;
Public Custom Event Activated As EventHandler(Of AppActivationArguments) 

Event Type

Attributes

Remarks

This event is only raised for redirected activations. In all other cases, apps should use either Microsoft.Windows.AppLifecycle.AppInstance.GetActivatedEventArgs or Windows.ApplicationModel.AppInstance.GetActivatedEventArgs to retrieve the arguments on activation.

Applies to