Tags: | Categories: Code Snippets Posted by Vitaly Zayko on 10/22/2010 5:47 PM | Comments (0)

Playing with most recent Windows Phone 7 Tools I found that custom icons don’t appear in emulator by default although they exist in a solution.

wp7_no_icons

 <shell:ApplicationBarIconButton IconUri="/Images/add.png" Text="Add" Click="AddClick" />
 <shell:ApplicationBarIconButton IconUri="/Images/remove.png" Text="Remove" Click="RemoveClick"/>

This happens because pictures adding with “Resource” as default build action. To make this work, select your recently added picture in Solution Explorer, switch to Properties and change Build Action to “Content”. After recompiling you will get your icons in place.

vs_menuwp7_with_icons

Technorati Tags:

Comments are closed