ApplicationBarIconButton not displaying

﹥>﹥吖頭↗ 提交于 2019-12-11 09:55:33

问题


I create images from online at picresize.com to use as application bar icons. I made them 48 x 48. The only thing I didn't do was make the background transparent. Now the icons just show as white blocks and nothing else. This page, http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff431806(v=vs.105).aspx, specifies what should be done but doesn't say a must. Any thoughts or experiences in this happening to others?

appBarButton =
                new ApplicationBarIconButton(new Uri("/Assets/AppBar/<my_button>.png", UriKind.Relative));
            appBarButton.Text = "<text>";
            appBarButton.Click += appBarButton_Click;

            ApplicationBar.Buttons.Add(appBarButton);

回答1:


The transparent background is a must.

Instead of using that picresize.com web service, you should probably learn to use Photoshop, Paint.Net, or any other descent image editor that works on your computer not on someone else's computer.



来源:https://stackoverflow.com/questions/22945468/applicationbariconbutton-not-displaying

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