Provides event information when an app is launched.
JavaScript: This type appears as WebUILaunchActivatedEventArgs.
Syntax
public sealed class LaunchActivatedEventArgs : Object, ILaunchActivatedEventArgs, IActivatedEventArgs
Attributes
- MarshalingBehaviorAttribute(Agile)
- VersionAttribute(NTDDI_WIN8)
Members
The LaunchActivatedEventArgs class has these types of members:
Methods
The LaunchActivatedEventArgs class inherits methods from the Object class.
Properties
The LaunchActivatedEventArgs class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the arguments that are passed to the app during its launch activation. | |
| 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. |
Remarks
This object is accessed when you respond to Activated events when ActivationKind is Launch.
Windows Store apps built for Windows 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.
All Application overrides involved in an activation scenario should call Window.Activate in their implementations.
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.
JavaScript launch completion
If programming with JavaScript, launch is complete when your activated event handler returns successfully after executing your launch tasks.
.NET launch completion
If programming with C#, VB, or C++, launch is complete when you activate an app window.
Requirements
|
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 |
|
Namespace |
|
|
Metadata |
|
See also
- Launching, resuming, and multitasking
- How to activate an app
- Windows.UI.Core.CoreApplicationView.Activated
- Application
- OnLaunched
Build date: 2/25/2013