AppBar button icon not fitting inside elipse

梦想的初衷 提交于 2019-12-02 05:55:29

问题


Hey I am creating bottom app bar and adding 3, app bar button to it like shown below. One use inbuilt icon and the other two uses Bitmap icons

<AppBarButton>
<AppBarButton.Icon>
    <BitmapIcon UriSource="ms-appx:///Assets/Like.png" Height="20" Width="20"/>
</AppBarButton.Icon>

AppBarButton with bitmap icons display correctly in the design view, that is enclosed within the eclipse of appbar button. But when I deploy it on my phone the app bar button looks like below (two on the right)

https://s24.postimg.org/q3yg74gx1/wp_ss_20150309_0002.jpg

What is wron with it


回答1:


I think you may have forgotten about appropriate padding - more information at MSDN:




回答2:


I recommend you to find default Windows Phone icons in Microsoft SDKs folder on your PC. In my case it's C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Icons\Light. There you can check how to correctly prepare icons for your application bar.

They must be 76 x 76 PNG images (including padding) with alpha channel.



来源:https://stackoverflow.com/questions/28935766/appbar-button-icon-not-fitting-inside-elipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!