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

发布于 2024-10-04 08:09:10 字数 1187 浏览 0 评论 0原文

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

WP7 应用程序栏图标。混合(左),模拟器(右)

编辑 - 这是我的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 图标中找到文件夹

It is most probably a stupid mistake, but can anyone tell me why my icons are showing in Blend, but not in the simulator (and not in VS10, but that's not really an issue)?

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

Edit - Here is my 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>

My four .png files are 48x48, transparent .png with black foreground, since the appbar.*.rest.png files where like that and found in the Microsoft icons folder

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

菩提树下叶撕阳。 2024-10-11 08:09:10

确保图片属性“构建操作”为内容

Make sure that the image properties 'build to action' is Content.

独行侠 2024-10-11 08:09:10

您的图标是否:

  • 透明,前景白色,
  • 尺寸合适(48x48)
  • PNG

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

Are your icons:

  • Transparent with a white foreground
  • The right size (48x48)
  • PNGs

? If so, that should be fine. What does your XAML look like?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文