Posted on by & filed under Content - Highlights and Reviews, Mobile Development.

Glance and go, Really? Really!

If you have seen any marketing for the Windows Phone, you will recognize the new Start Screen with its giant icons that are brought to life with animations, count badges and messages. The Windows Phone Start screen was designed to provide a glance and go experience where each of the tiles has the ability to inform me of the important things in my life with a single glance. Do I have any new email? What is the latest tweet or Facebook update from my friends? What is the weather like outside?

When you build your own Windows Phone applications, you should consider how you can expose the important information from your application in a start tile. If you are building a turn based game, tell the user when it is their turn to play. Show the user’s latest high score or accomplishment. A nutrition or diet application might display daily nutrition or calorie statistics. A To Do List application should display the next task on the list.

The anatomy of an Application Tile

Application Tiles have two sides. The front side of the Tile has a background image, a title, and a count. The flip side of the Tile has a background image and a message. The Start screen will periodically flip the Application Tile over to expose the image or message displayed on the back of the Tile.

By default, the Visual Studio projects create single sided Application Tiles with only a Title and Background Image. The Title and Background Image properties for the tile can be set directly from a project’s properties page. This is a boring tile that remains static sitting next to all the fancy Live Tiles on the Start Screen. You can liven up your tile by setting the Count, Back Content, Back Title and Back Background Image properties so that the phone flips your Tile. These additional properties can be specified in your application’s WMAppManifest.xml file.

When you submit your application to the Windows Phone Marketplace you must have a background image and a title. The title must match the title you specify during the application submission process.

A flipping Application Tile will not have the full experience of the native Live Tiles, and you cannot fully animate a Tile like the Xbox Live or People Hub tiles. A two sided flipping tile is livelier that the default single sided tile.

What about that whole Glance and Go thing we were talking about?

Dynamically changing the Application Tile

Windows Phone users expect to glance at an Application Tile and immediately see important details from the application. Of course the important details change quite often and cannot be hard coded into the application manifest file. You can programmatically update the Application Tile from code, thanks to the StandardTileData and ShellTile classes.

The tile properties are exposed and are set with property setters on the StandardTileData class. You can use images from the application’s .xap file, the SharedShellContent folder in isolated storage, or from a remote location referenced by an http Url. The ShellTile class provides a static property named ActiveTiles. The first item in the in the ActiveTiles collection is always the main Application Tile, whether it has been pinned to the start screen or not. If you update the main tile, it will appear with the updated values if and when the user finally does pin it.

When you call the Update method, only the properties specified in the StandardTileData object are updated. If the properties are null, they are not updated. To clear a property, set string values to an empty string, or create Uri objects with an empty relative path.

An application can generate new images, writing them to the SharedShellContent folder in isolated storage or images can be download from a web site and store them in the SharedShellContent folder. When using an image from isolated storage, build the Uri with the isostore scheme.

You can also use an image from directly from a web site. If the image is not the standard 173 x 173 pixels, it will be stretched to fit.

In addition to updating your tile from your running application, you can update the tile from a background agent, by using Microsoft’s push notification service or by using the ShellTileSchedule class.

Background updates to your Tile

Background agents are a special type of project that, surprise, runs in the background. There are two types of background agents – periodic and resource intensive. One runs for 15 seconds every half hour, and the other runs for 10 minutes when the device is plugged in, fully charged and idle. Inside the background agent’s OnInvoke method is where you would place your code that performs the necessary status checking before updating the Application Tile by calling the ShellTile.Update method.

Background Agents allow an application to periodically check for updates from a web service using a pull model. The Windows Phone also allows a web service to push tile updates to a phone via the Microsoft Push Notification Service – recently renamed to the Windows Notification Service. Tile Notifications can update the same title, background image, count and content properties that are accessible through the manifest file or the StandardTileData class.

Finally, tile updates can be scheduled to run with the ShellTileSchedule class. ShellTileSchedule is limited to updating just the Background Image displayed on the front of the tile with an image specified by an http Url. The tile image can be set to update hourly, daily, weekly or monthly.

Safari Books Online has the content you need

Check out these Windows Phone 7 books available from Safari Books Online:

Windows 7 Plain & Simple is your easy, colorful, SEE-HOW guide to Windows Phone 7. You’ll learn the quickest ways to set up and use your new phone with easy-to-follow steps, screenshots, and concise, straightforward language that make learning plain and simple!
Windows Phone 7 provides an exciting new opportunity for companies and developers to build applications that travel with users, are interactive and attractive, and are available whenever and wherever users want to work with them. Windows Phone 7 Developer Guide walks through a series of fictional, but realistic scenarios involved in building a phone application that uses a mobile front end talking to a cloud backend. Microsoft Silverlight Edition: Programming Windows Phone 7 helps you get started building applications for Windows Phone 7, expertly guided by award-winning author Charles Petzold. You’ll focus on the core concepts and techniques for creating apps with Microsoft Silverlight. Charles brings a unique combination of pragmatism and authority to his instruction—along with an eminently readable style and a wealth of hands-on examples. In Microsoft XNA Framework Edition: Programming Windows Phone 7, you’ll focus on the core concepts and techniques for creating apps with Microsoft XNA. Charles brings a unique combination of pragmatism and authority to his instruction—along with an eminently readable style and a wealth of hands-on examples. Microsoft XNA Game Studio 4.0: Learn Programming Now! is your hands-on introduction to computer programming with Microsoft Visual C# 2010 and XNA Game Studio 4. Get fun, easy-to-follow instructions for customizing your Xbox 360 games—or creating your own!

About the Author

  Timothy Binkley-Jones is a staff engineer in the Cloud Infrastructure and Management group of VMware, Inc. Tim is a co-author of Windows Phone 7 in Action by Manning Publications, and regularly speaks about mobile application and cloud development at user groups and conferences in the Colorado area. Tim has been developing commercial IT management applications for 15 years. You can follow his blog at or follow him on twitter at @timblinkleyjones.



  1.  Xbox 360 Games For Kids 2009