Share via


AppInstance.GetActivatedEventArgs Method

Definition

Retrieves the event arguments for an app activation that was registered by using one of the static methods of the ActivationRegistrationManager class.

public:
 virtual AppActivationArguments ^ GetActivatedEventArgs() = GetActivatedEventArgs;
/// [Windows.Foundation.Metadata.Experimental]
AppActivationArguments GetActivatedEventArgs();
AppActivationArguments GetActivatedEventArgs();
[Windows.Foundation.Metadata.Experimental]
public AppActivationArguments GetActivatedEventArgs();
public AppActivationArguments GetActivatedEventArgs();
function getActivatedEventArgs()
Public Function GetActivatedEventArgs () As AppActivationArguments

Returns

An object that contains the activation type and the data payload, or null. See Remarks.

Attributes

Remarks

The AppActivationArguments object returned is limited to those activation kinds that are supported in the Windows App SDK. As of version 1.0, those are Launch, File, Protocol, and StartupTask. For other activation kinds, GetActivatedEventArgs returns null.

For packaged apps, this method wraps the Windows.ApplicationModel.AppInstance.GetActivatedEventArgs method, and therefore returns the same value. Also for packaged apps, this method will only return the arguments the first time it is called in an app. So, you should call it as early as possible during activation, as the arguments may become unavailable later.

Applies to

See also