DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Windows Phone: Theme colored tile and icon

Windows Phone: Theme colored tile and icon

Sumit Dutta user avatar by
Sumit Dutta
·
Jul. 06, 12 · Mobile Zone · Interview
Like (0)
Save
Tweet
4.19K Views

Join the DZone community and get the full member experience.

Join For Free

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.

<Tokens>
   <PrimaryToken TokenID="WP___Theme_Color_Applicaion_TileToken" TaskName="_default">
      <TemplateType5>
         <BackgroundImageURI IsRelative="true" IsResource="false">pushpin-B.png</BackgroundImageURI>
         <Count>0</Count>
         <Title>WP___Theme_Color_Applicaion_Tile</Title>
      </TemplateType5>
   </PrimaryToken>
</Tokens>

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!

 

 

Windows Phone Icon

Published at DZone with permission of Sumit Dutta, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The Need for a Kubernetes Alternative
  • Optional in Java: When Better Code Is Not an Alternative
  • 7 Great Terminal/CLI Tools Not Everyone Knows
  • What Are Protocol Buffers?

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo