Provides event information when an app is launched.
Public NotInheritable Class LaunchActivatedEventArgs Implements ILaunchActivatedEventArgs, _ IActivatedEventArgs, _ IApplicationViewActivatedEventArgs
The LaunchActivatedEventArgs class has these types of members:
The LaunchActivatedEventArgs class inherits methods from the Object class.
The LaunchActivatedEventArgs class has these properties.
|Read-only||Gets the arguments that are passed to the app during its launch activation.|
|Read-only||Gets the identifier for the currently shown app view.|
|Read-only||Gets the reason that this app is being activated.|
|Read-only||Gets the execution state of the app before this activation.|
|Read-only||Gets the splash screen object that provides information about the transition from the splash screen to the activated app.|
|Read-only||Gets the ID of the source that was invoked to launch the application.|
Windows Store apps using C++, C#, or Visual Basic typically implement activation points by overriding methods of the Application object. The default template app.xaml code-behind files always include an override for OnLaunched. The default implementation includes initial navigation support and state management through the SuspensionManager helper class.
Avoid performing tasks during launch if they could significantly increase the time required to launch your app. Instead, you can trigger additional loading tasks by listening for the SplashScreen.Dismissed event.
The activation deferral object should not be used to complete complex tasks during activation. Any unhandled errors or exceptions that occur during activation (including deferred activation) will cause the app to crash. If you need to perform network calls or process a number of additional files during activation, consider launching your app to an extended splash screen and then performing these operations. For more information, see How to display a splash screen for an extended time.
Important Apps that require an excessive amount of time to launch may be terminated by the system.
When testing your app, be aware that immediately reactivating an app that has just been terminated will result in a failed activation if the splash screen is still visible.
If programming with C#, VB, or C++, launch is complete when you activate an app window.
Minimum supported client
|Windows 8 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 [Windows Store apps only]|
Minimum supported phone
|Windows Phone 8|
- Launching, resuming, and multitasking
- How to activate an app