I am developing my first application for Windows Phone 7, and I need to add an application bar with icons.
I mentioned this "How To": http://msdn.microsoft.com/en-us/library/ff431786(VS.92).aspx ("Creating an Application Bar in XAML")
But when I start the emulator, I see no signs: I see a black circle with an X in the center and the ApplicationBarIconButton_Click event is correctly raised.
I am using the icon from the WP7AppBarIcons.zip samples, and my code is below:
<phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"> <shell:ApplicationBarIconButton IconUri="/images/appbar.transport.play.rest.png" Text="Home" Click="ApplicationBarIconButton_Click"/> <shell:ApplicationBarIconButton IconUri="/images/appbar.favs.rest.png" Text="Preferiti" Click="ApplicationBarIconButton_Click"/> <shell:ApplicationBarIconButton IconUri="/images/appbar.questionmark.rest.png" Text="About" Click="ApplicationBarIconButton_Click"/> <shell:ApplicationBar.MenuItems> <shell:ApplicationBarMenuItem Text="MenuItem 1"/> <shell:ApplicationBarMenuItem Text="MenuItem 2"/> </shell:ApplicationBar.MenuItems> </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar>
Obviously, I have a root folder named "images" containing the mentioned 48 x 48 icons.
Thanks a lot!
source share