Today we will learn how to create a Secondary Tile in a Metro Style Application. Secondary tiles are associated with a single parent app and allows the user to directly access a specific location inside an app. This means it enables a user to pin specific content or experiences from an app to the Start screen, to have direct access to that content or experience.

When the user clicks on the secondary tile, it immediately launches the parent app. Generally we can create a secondary tile which is most often in the UI as the Pin to Start option. To pin content means to create a secondary tile for it.

It may be noted here that only users can pin a secondary tile and apps do not have the ability to create and pin secondary tiles programmatically without user approval. Although users also have explicit control over secondary tiles such as removal and search, from the Start screen.

This article walks you through the steps of how to create a secondary tile for an app in a Metro Style Application using C# and pin it to the Start screen.

Step 1: First, we create some UI layout for the application. Use a button that enables you to create a secondary tile, as in:

Step 3: After setting the properties now we create an object of the SecondaryTile Class and call its constructor.

Code:

SecondaryTile s = newSecondaryTile(MainPage.logoSecondaryTileId,

"Title text shown on the tile", "Name of the tile the user sees when searching for the tile",

tileActivationArguments, TileOptions.ShowNameOnLogo,logo);

Step 4: Now, we call a method of the SecondaryTile class that enables you to pin a Secondary Tile to the Start Screen. This method pins the tile to the start screen after user confirmation and retuns a staus as a boolean value.