AppInstance.GetActivatedEventArgs Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current IActivatedEventArgs, the same that would normally be passed in to the OnActivated method of the app.
public:
static IActivatedEventArgs ^ GetActivatedEventArgs();
static IActivatedEventArgs GetActivatedEventArgs();
public static IActivatedEventArgs GetActivatedEventArgs();
function getActivatedEventArgs()
Public Shared Function GetActivatedEventArgs () As IActivatedEventArgs
Returns
The current IActivatedEventArgs, or null
.
Examples
This example gets the event arguments for the specified app instance.
IActivatedEventArgs activatedArgs = AppInstance.GetActivatedEventArgs();
Remarks
This method gets the same arguments that would be passed in to the OnActivated method of the app.
This method allows the app to access its arguments much earlier, in its Main
method, which is the first app method to be called.
Note
For packaged apps, this method only returns arguments on its first call. Subsequent calls return null
.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for