Over a million developers have joined DZone.

Windows Phone: Theme colored tile and icon

DZone's Guide to

Windows Phone: Theme colored tile and icon

· Mobile Zone ·
Free Resource

In this short article I will explain how to change the color of Tiles when you change the color of theme.

In one of my previous article Part 29 - Windows Phone 7 - Application Tile Image I talked about how to create Application Tile Image in Windows Phone.

Let's see how we can create Theme Colored Tile image.

Step 1: Create a Silverlight Windows Phone project.

Step 2: Add transparent image background in the project. Right click and go to properties window and change the Build Action to Content.

Transparent image and the image should be part of XAP package, a project content is mandatory requirement to change the color of Tiles as per theme.

Step 3: Expand properties folder it is collapsed and open WMAppManifest.xml.

Step 4: <PrimaryToken> element sets the Tile image of application. pushpin-B.png has transparent background.

   <PrimaryToken TokenID="WP___Theme_Color_Applicaion_TileToken" TaskName="_default">
         <BackgroundImageURI IsRelative="true" IsResource="false">pushpin-B.png</BackgroundImageURI>

Step 5: Now run the application, change the color of theme (I have changed to teal) and pin the app to start window. You will notice color of tile is same as theme color which is teal.

Windows Phone - Theme Colored Tile

Now if you notice the image of icon is not based on theme color. It is good to keep icon and tile image same.

Windows Phone - Theme Colored Tile 1

Step 6: <IconPath> element is used to change the color of icon based on the them color. I have put same transparent image over here also.

<IconPath IsRelative="true" IsResource="false">pushpin-B.png</IconPath>

Step 7: Now run the application and you will notice that color of icon is also based on theme.

Windows Phone - Theme colored icon

This ends the article of theme based Tile and Icon image in Windows Phone.

Like us if you find this post useful. Thanks!




Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}