我正在开发一个应用程序,整个主题是自定义的,完全独立于用户在其设备上选择的任何主题。有没有办法防止Windows Phone的应用程序栏图标重新上色?我在这里使用自定义颜色作为背景色,黑色看起来很糟糕。
我知道这是可能的,因为Windows Phone的Twitter应用程序会这样做。任何提示将不胜感激。由于
杰森非常感谢jimpanzer指出这一点。
确保无论用户的主题设置如何,图标始终是白色的。
很好
XAML
下面的XAML演示了如何设置应用程序栏的前景和背景颜色以及不透明度。
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.75" ForegroundColor="Green" BackgroundColor="Cyan">
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="MenuItem 1"/>
<shell:ApplicationBarMenuItem Text="MenuItem 2"/>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
c#
ApplicationBar = new ApplicationBar();
//Now set the AppBar properties :
ApplicationBar.Opacity = 0.75;
ApplicationBar.BackgroundColor = Color.FromArgb(120, 0,190,190);
ApplicationBar.ForeGroundColor = Color.FromArgb(120, 0,140, 43);