WP7应用程序栏图标未在模拟器上显示(但在Blend中有效)

时间:2010-11-24 11:26:36

标签: c# vb.net xaml windows-phone-7 windows-phone-8

这很可能是一个愚蠢的错误,但任何人都可以告诉我为什么我的图标在Blend中显示,但不在模拟器中(而不是在VS10中,但这不是真正的问题)?

WP7 Application Bar Icons. Blend (left), Simulator (right)

修改 - 这是我的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>

我的四个.png文件是48x48,透明.png,带有黑色前景,因为appbar.*.rest.png文件在那里可以找到并在Microsoft图标文件夹中找到

2 个答案:

答案 0 :(得分:96)

确保图片属性“构建为行动”为内容

答案 1 :(得分:3)

是你的图标:

  • 透明,白色前景
  • 正确尺寸(48x48)
  • PNG图像

?如果是这样,那应该没问题。你的XAML是什么样的?