简体   繁体   English

应用栏图标XAML WP8

[英]App Bar Icon XAML WP8

I wish to use this icon for my app bar button on a windows phone app. 我希望将此图标用于Windows Phone应用程序上的应用程序栏按钮

I can do it using the .png files. 我可以使用.png文件来做到这一点。 But how to use it in XAML for Windows Phone. 但是如何在Windows Phone的XAML中使用它。

I am looking for a way to do it like that in Windows 8. ie- using it with Content Tag and using a Font to draw it. 我正在寻找一种在Windows 8中做到这一点的方法,即,将其与Content Tag一起使用, 并使用Font进行绘制。

This is not possible with the current Windows Phone SDK. 当前的Windows Phone SDK无法做到这一点。

The ApplicationBarIconButton only support rendered images. ApplicationBarIconButton仅支持渲染的图像。

Download and add the image to the project. 下载图像并将其添加到项目中。

/Assets/1F698-Car.48.png

In Xaml : Xaml中

xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"

<phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar>
        <shell:ApplicationBarIconButton IconUri="/Assets/1F698-Car.48.png"
                                        Text="Car" />
    </shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM