ILaunchActivatedEventArgs ILaunchActivatedEventArgs ILaunchActivatedEventArgs ILaunchActivatedEventArgs ILaunchActivatedEventArgs Interface

Definition

Provides event information when an app is launched.

public : interface ILaunchActivatedEventArgs : IActivatedEventArgs
struct winrt::Windows::ApplicationModel::Activation::ILaunchActivatedEventArgs : IActivatedEventArgs
public interface ILaunchActivatedEventArgs : IActivatedEventArgs
Public Interface ILaunchActivatedEventArgs Implements IActivatedEventArgs
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Inheritance
ILaunchActivatedEventArgsILaunchActivatedEventArgsILaunchActivatedEventArgsILaunchActivatedEventArgsILaunchActivatedEventArgs
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Interface inheritance

ILaunchActivatedEventArgs inherits IActivatedEventArgs. Types that implement ILaunchActivatedEventArgs also implement the interface members of IActivatedEventArgs.

Properties

Arguments Arguments Arguments Arguments Arguments

Gets the arguments that are passed to the app during its launch activation.

public : Platform::String Arguments { get; }
winrt::hstring Arguments();
public string Arguments { get; }
Public ReadOnly Property Arguments As string
var string = iLaunchActivatedEventArgs.arguments;
Value
string string string

The list of arguments.

Kind Kind Kind Kind Kind

Gets the reason that this app is being activated.

(Inherited from IActivatedEventArgs)

PreviousExecutionState PreviousExecutionState PreviousExecutionState PreviousExecutionState PreviousExecutionState

Gets the execution state of the app before this activation.

(Inherited from IActivatedEventArgs)

SplashScreen SplashScreen SplashScreen SplashScreen SplashScreen

Gets the splash screen object that provides information about the transition from the splash screen to the activated app.

(Inherited from IActivatedEventArgs)

TileId TileId TileId TileId TileId

Gets the ID of the tile that was invoked to launch the app.

public : Platform::String TileId { get; }
winrt::hstring TileId();
public string TileId { get; }
Public ReadOnly Property TileId As string
var string = iLaunchActivatedEventArgs.tileId;
Value
string string string

The ID of the tile that launched the app. If the app's main tile was used, this value is "App". If a secondary tile is used, the SecondaryTile.TileId value, assigned to the secondary tile when it was created, is returned.

Remarks

Starting with Windows 10, TileId behavior is different for apps that are launched after having been terminated. Previously, the TileId always returned the ID of the tile that launched the app. The TileId behavior now depends on how the app is reactivated:

How the app is reactivatedBehavior of TileId
The user switches to the app by using the task switcher or by using the global back keyReturns the empty string ("").
The user taps the app tileReturns the tile ID.

The new behavior makes it possible to differentiate between a switch to the app versus a re-launch of the app. If your app uses tile ID information during activation, handle the TileId=="" case. For example:

protected override void OnLaunched(LaunchActivatedEventArgs e)
{
...
  if (e.TileId == "")
  {
    // resumed from switch/backstack
  }
  else
  {
    // resumed from tile launch
  }
...
}

See Also