我正在开发我的第一个Windows Phone 7应用程序,我需要添加一个带有图标的应用栏。我参考了这个"How To":http://msdn.microsoft.com/en-us/library/ff431786(VS.92).aspx("在XAML中创建应用栏"段落)。但是当我运行模拟器时,我看不到图标:我只看到黑色圆圈,并且事件ApplicationBarIconButton_Click被正确触发。我正在使用来自WP7AppBarIcons.zip示例的图标,我的代码如下:
显然,我有一个名为“images”的根解决方案文件夹,其中包含所提到的48 x 48图标。
非常感谢!
<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>
显然,我有一个名为“images”的根解决方案文件夹,其中包含所提到的48 x 48图标。
非常感谢!