TileId property
Collapse the table of content
Expand the table of content

ILaunchActivatedEventArgs.TileId property

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

Syntax


property String^ TileId { 
   String^ get();
}

Property value

Type: System.String [.NET] | Platform::String [C++]

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
  }
...
}

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

ILaunchActivatedEventArgs

 

 

Show:
© 2016 Microsoft