改变WP7中应用程序Application Bar的背景色和前景色
文章信息
本文翻译自: Changing the Background and Foreground Colors of Application Bar on WP7
简介
Application Bar是一个内置的UI元素。你可以使用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>
总结
通过改变XAML中Opacity, Foreground 和 Background属性,你可以改变你的颜色。


(no comments yet)