Every Windows Phone Application Deserves a Live Tile (part 1)
Join the DZone community and get the full member experience.Join For Free
live tiles have been one of the nice differentiators of windows phone. in mango, live tiles even got better, as a matter of fact, way better for end users and for 3rd party application developers. today, applications can benefit from multiple secondary tiles that allow deep linking into the application. with mango, all tiles have a front and a back that can contain different information. on the home screen, tiles with information stored on both the front and the back side will regularly flip over to see both sides of the tile.
in this article you will learn how even the simplest applications can benefit from live tiles, with the possibility to update the information presented on the tile locally.
each application has at least one tile, the application tile. it is up to the user to pin this tile to the start screen on their phone. by default, this tile is single sided, meaning it will not flip over to show the back to the user.
in order to use both sides of a tile, you can initially add the appropriate properties to the wmappmanifest.xml file. the cool part of completely defining your double sided application tile in the wmappmanifest.xml file is that the tile starts rotating immediately when the user pins the tile to the start screen, even if the application has never been started by the user. that is the starting point of this blog entry.
one of my sample applications that is available through the windows phone marketplace is a simple game called clicker. in its original form it of course has an application tile, that simply looks like this. the tile only shows the application title and uses transparency to display some areas using the selected theme color on the phone.
initially, the backside of the tile will contain a text inviting a user to play a game. therefore an initial backside of the tile is created in the wmappmanifest.xml file as follows:
even though this is an acceptable first approach, the end user experience could still be improved. clicker is a localized application with support for a few different languages. the message on the back of the application tile should therefore be localized as well for the different supported languages. with a little extra effort that can be achieved as well.
in order to put localized strings in the manifest file, you need to provide a native resource dll for each local language that your application supports. if you are using visual studio 2010 professional or better to develop your windows phone applications, you can literally follow the actions that are described in this msdn how to page . however, if you are using the express edition of visual studio 2010 to develop your windows phone applications, you cannot create a native win32 dll. in that situation, you might be able to use the tool that patrick getzman created to localize application tiles. i am not sure if this tool currently supports creating localized backtitle and backcontent strings though. if not you either have to kindly ask patrick for support or you can make use of the free visual c++ 2010 express version to create the resource dll.
here are the two different string tables that i created in a neutral language resource dll and in a dutch language resource dll.
|apptilebackcontent||400||play clicker and beat your own high score!|
neutral language string table in appreslib.dll
|apptilebackcontent||400||speel en verbeter je beste score!|
dutch language string table in appreslib.dll.0413.mui
after changing the wmappmanifest.xml file’s templatetype5 content to the following, the application tile now appears in dutch on a dutch windows phone 7.5 device and in us english on any other device.
and here is the result:
the next blog entry will dig deeper into live tiles and shows you how to update the high score for this game on the backside of the application tile. at that time, the mango update of the clicker application will also be available through marketplace. if you can’t wait to start playing with the application, the current version (without live tiles) is available here for download or at your own local windows phone marketplace.
other parts in this series:
- setting the stage and initializing the application tile
- updating an application tile from inside your application
- using a background agent to periodically updating tiles
- creating and using secondary tiles
- setting the stage for eventiles
if you want to learn more on how to develop a windows phone application, make sure to take a look at
, a series on windows phone application development with articles, videos and source code available for download.
Opinions expressed by DZone contributors are their own.