有没有办法将Windows Phone上的系统托盘颜色从黑色更改为白色?我的应用程序背景是白色的,所以我希望系统托盘也是白色的。
发布于 2011-11-10 06:11:31
在芒果/7.1中,您可以设置SystemTray的BackgroundColor属性。如果你的目标是7.0,你唯一的选择就是使用SystemTray.IsVisible完全隐藏SystemTray。
发布于 2011-11-10 13:55:36
您可以在您的页面XAML中执行此操作:
<phone:PhoneApplicationPage
...
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
shell:SystemTray.IsVisible="True"
shell:SystemTray.BackgroundColor="Blue">
...发布于 2015-10-31 17:24:02
如果你想从xaml中改变它,你可以这样做。
<phone:PhoneApplicationPage .........................
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
shell:SystemTray.BackgroundColor="{StaticResource AppThemeColor }"
shell:SystemTray.IsVisible="True">其中"AppThemeColor“是我的应用程序的样式资源中预定义的颜色。
如果您想从C#代码中更改它。然后,您可以在OnNavigatedTo()事件中使用以下代码。
SystemTray.BackgroundColor = Color.FromArgb(255, 250, 110, 40); //background color
SystemTray.ForegroundColor = Color.FromArgb(120, 245, 245, 245);//foreground if you need
SystemTray.Opacity = 0.9; // opacity of background colorhttps://stackoverflow.com/questions/8072410
复制相似问题