Home > Metro, Windows 8 > Windows 8 Secondary Tiles

Windows 8 Secondary Tiles

User can invoke a function of your program to create a secondary tile on the startscreen.

This can be used to directly jumping into a specific context of your app. If the user clicks on this secondary tile, then the provided startup argument will be provided to the OnLaunch event. Pinning and unpinning can only be done through the user and cannot be fully automated.

The user always must fill out a small dialog and then click OK to pin a secondary tile.

Sample dialog:

image

 

To pin a secondary tile, the following code is needed:

Uri logo = new Uri("ms-appx:///Assets/SecondaryTile.png");

SecondaryTile secondaryTile = 
    new SecondaryTile(SECONDARY_TILE_ID,
                        "Title text...",
                        "text for search in start screen",
                        "arguments for startup",
                        TileOptions.ShowNameOnLogo,
                        logo);

bool isPinned = await secondaryTile.RequestCreateAsync();

Removing a secondary tile can be done manually by the user itself or from code:

SecondaryTile secondaryTile = new SecondaryTile(SECONDARY_TILE_ID);
bool isRemoved = await secondaryTile.RequestDeleteAsync();

Categories: Metro, Windows 8
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: