Windows Phone ApplicationBarIconButton not displaying icons
So you’ve added an ApplicationBarIconButton to your Windows Phone 7 Silverlight page and you can’t get the icons to display. You’ve tried every path under the sun, pack uri’s, relative uri’s, checked the case everything – still no dice. You’ve put an image control on the page and the image displays fine. So WHY!
Answer: you need to set the image build action to “Content” but it defaults to “Resource”.
<shell:ApplicationBarIconButton
IconUri="/ApplicationBar/light/appbar.delete.rest.png"
Text="delete all"/>
I’ve logged this as a bug, but I think its by design. I’m trying to find out why.
Written by Paul Tallett
Comments
Anonymous
December 18, 2010
The comment has been removedAnonymous
January 28, 2011
The comment has been removedAnonymous
May 15, 2011
HI , I just want to know if u guys have solved this or not please let me know.Anonymous
May 16, 2011
Thx, saved me a lot of time playing CSI: Microsoft...Anonymous
June 27, 2011
thanks a lot!Anonymous
July 03, 2011
finally an answer ThanksAnonymous
August 02, 2011
Thanks.Anonymous
August 04, 2011
Awesome ! Thanks, that saved me hours of frustation !Anonymous
August 15, 2011
Yes thanks.... actually I recently did a tutorial for adding images to the toolkit DatePicker control.. and the guy explicitly said "Don't forget to change the Build Action"... and I forgot. So it looks like this behavior holds true for all images copied into the project.Anonymous
November 26, 2011
I wish I had found this blog post earlier. :D However, thank goodness I finally found the mistake!Anonymous
December 19, 2011
Still a bugs and thank you very muchAnonymous
January 11, 2012
The comment has been removedAnonymous
March 29, 2012
The comment has been removedAnonymous
September 12, 2012
You have saved me from doubting my sanity. Thanks! Still can't get that "Resource" style Uri working but I'm fine with the "Content" style setup. Oh, thanks again.