WP7应用程序栏图标不显示在模拟器(但在Blend作品)
问题描述:
这最有可能是一个愚蠢的错误,但谁能告诉我为什么我的图标在Blend中显示,但不是在模拟器(而不是在VS10,但这不是一个问题)?WP7应用程序栏图标不显示在模拟器(但在Blend作品)
编辑 - 这是我的XAML:
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton IconUri="/Images/share.png" Text="Partager"/>
<shell:ApplicationBarIconButton IconUri="/Images/appbar.edit.rest.png" Text="Note"/>
<shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.camera.rest.png" Text="Photos/Vidéos"/>
<shell:ApplicationBarIconButton IconUri="/Images/calendar.png" Text="Rendez-vous"/>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="MenuItem 1"/>
<shell:ApplicationBarMenuItem Text="MenuItem 2"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
我那个4个.png文件的48x48的,透明的PNG与黑色前景,因为appbar.*.rest.png
文件,其中这样的,在微软的图标文件夹中找到
答
确保图像属性'构建到行动'是内容。
答
是你的图标:
- 透明的白色前景
- 右大小(48×48)
- PNG格式
?如果是这样,那应该没问题。你的XAML是什么样的?
我更新了我的问题,前景是黑色的,但除此之外一切都像你说的。我在Program Files \ Microsoft SDKs \ Windows Phone \ v7.0 \ Icons中发现了其中的两个图标,所以我不认为黑色前景是问题... – 2010-11-24 11:51:27
@Thomas:那么,文档特别说明了前景应该是白色的IIRC,所以它至少值得尝试。 – 2010-11-24 12:11:46