简体   繁体   English

如何在WP8 silverlight中更改状态栏的背景颜色?

[英]How to change the background color of Status Bar in WP8 silverlight?

Is there any way to change the Background Color of status bar in Windows Phone 8 silverlight application? 有没有办法在Windows Phone 8 silverlight应用程序中更改状态栏的背景颜色?

在此输入图像描述

It is quite easy to do that, but I'm not sure if it is reflected in the emulator (better try it on a real device). 这很容易做到,但我不确定它是否反映在模拟器中(最好在真实设备上试一试)。

Open the XAML of the page where you want to change the status bar and then change these properties the way you want them to be: 打开要更改状态栏的页面的XAML,然后按照您希望的方式更改这些属性:

shell:SystemTray.IsVisible="True"
shell:SystemTray.BackgroundColor="#2440b2"
shell:SystemTray.ForegroundColor="White"

The *.IsVisible property ensures the status bar is visible, the *.BackgroundColor is setting the correct background of the status bar and finally the *.ForegroundColor changes the color of text and icons. * .IsVisible属性确保状态栏可见,* .BackgroundColor设置状态栏的正确背景,最后* .ForegroundColor更改文本和图标的颜色。

Check this property>> PhoneBackgroundColor 检查此属性>> PhoneBackgroundColor

Follow this link to get more details>> 点击此链接获取更多详细信息>>

http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff769552%28v=vs.105%29.aspx http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff769552%28v=vs.105%29.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM