LaunchActivatedEventArgs class

Applies to Windows and Windows Phone

Provides event information when an app is launched.

JavaScript:  This type appears as WebUILaunchActivatedEventArgs.

Syntax


public sealed class LaunchActivatedEventArgs : ILaunchActivatedEventArgs,
    IActivatedEventArgs,
    IApplicationViewActivatedEventArgs

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The LaunchActivatedEventArgs class has these types of members:

Properties

The LaunchActivatedEventArgs class has these properties.

PropertyAccess typeDescription

Arguments

Read-onlyGets the arguments that are passed to the app during its launch activation.

CurrentlyShownApplicationViewId

Read-onlyGets the identifier for the currently shown app view.

Kind

Read-onlyGets the reason that this app is being activated.

PreviousExecutionState

Read-onlyGets the execution state of the app before this activation.

SplashScreen

Read-onlyGets the splash screen object that provides information about the transition from the splash screen to the activated app.

TileId

Read-onlyGets the ID of the tile that was invoked to launch the app.

 

Remarks

This object is accessed when you respond to Activated events when ActivationKind is Launch.

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.

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

Windows.ApplicationModel.Activation
Windows::ApplicationModel::Activation [C++]

Metadata

Windows.winmd

See also

Launching, resuming, and multitasking
How to activate an app
Windows.UI.Core.CoreApplicationView.Activated
Application
OnLaunched

 

 

Show:
© 2014 Microsoft