Sunday, December 11, 2011

Icons aren't display on Application Bar



There are a lot of Application Bar Icons in Windows Phone SDK (\Program Files\Microsoft SDKs\Windows Phone\v7.1\Icons)


You add icons in your project, and write bellow code. But icons aren't display by default. See above picture.


<phone:PhoneApplicationPage.ApplicationBar>  
   <shell:ApplicationBar Opacity=".5">  
     <shell:ApplicationBarIconButton Text="Email" IconUri="Icons/email.png" />  
     <shell:ApplicationBarIconButton Text="Delete" IconUri="Icons/delete.png" />  
     <shell:ApplicationBar.MenuItems>  
     </shell:ApplicationBar.MenuItems>  
   </shell:ApplicationBar>  
</phone:PhoneApplicationPage.ApplicationBar>  


Icons and other pictures Build Action is "Resource". You need to change Build Action from "Resource" to "Content" if you use theses pictures in your app.


     


After above setting, you can see icons on Application Bar.

No comments:

Post a Comment