Windows Phone ApplicationBar BackgroundColor property style XamlParseException

∥☆過路亽.° 提交于 2019-12-01 19:15:14

I believe, ApplicationBar properties cannot use Binding or styling the way you're trying, as it is not a silverlight control. Although you can put the whole applicationbar as a resource. Like so

<shell:ApplicationBar x:Key="MyAppBar" IsVisible="True" BackgroundColor="#006699">
         <shell:ApplicationBarIconButton IconUri="/Images/image.png" Text="image"  IsEnabled="True"/>  
</shell:ApplicationBar>

EDIT: Or you could just put this in the resource if you want your application bar color to change.

<shell:ApplicationBar x:Key="MyAppBar" IsVisible="True" BackgroundColor="#006699">
</shell:ApplicationBar>

And add buttons from code behind. although, I haven't come across a scenario where this would help.

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