Thursday, February 21, 2013

Working with Start Screen in Windows 8

To work with Start Screen of Windows 8 (or Windows Server 2012) programmatically via .NET Framework means you should look at Windows.UI.StartScreen namespace. The key entity there is secondary tile. In fact, the only class in this namespace has the same name:


This class is intended to provide information about secondary tiles of start screen. Secondary tiles allow you to personalize the Start Screen by having links and different kinds of other elements.

SecondaryTile class allows you to enumerates tiles:
IReadOnlyList<SecondaryTile> tilelist = await SecondaryTile.FindAllAsync();
This way you will get all the tiles belonging to calling application. Using another overload, you can get tiles belonging to another application from the same package. You can't get all the tiles from Start Screen - there is no way of doing that!

New tile can be created using RequestCreateAsync. You should set all the necessary properties of SecondaryTile object before calling this method otherwise you will get an exception.

After you will create secondary tile this way, it will belong to your application, of course.

Existing tile can be deleted using RequestDeleteAsync.

So the programmatic access to StartScreen seems to be limited. If you have any other ideas, you are welcome to share them. Do you know how to tune StartScreen programmatically?

1 comment: