我想改变系统托盘中图标的颜色(或预置大小,将它们设置为黑色主题-使用白色图标)。
在我的应用程序中,我有特定的配色方案,我正在使用它。我有系统托盘的背景颜色(电池,信号强度,wifi强度等的地方)显示设置为特定的颜色,当我使用黑色主题时,它工作得很好。
但当我将手机换成浅色主题时,我喜欢使用白色图标,因为我的系统托盘被设置为深色背景(让应用程序感觉单片),但无论我将其设置为哪种颜色,系统托盘中的图标都仍然是黑色的。
我用XAML设置它,下面是代码:
...
shell:SystemTray.IsVisible="True"
shell:SystemTray.BackgroundColor="#FF222222"
shell:SystemTray.ForegroundColor="#FFFFFFFF">我做错了什么。有没有可能改变前景色主题?
发布于 2014-04-02 21:01:20
我想你可能引用了错误的程序集。这可能会对您使用Microsoft.Phone.Shell;assembly=Microsoft.Phone有所帮助
您可以简单地在XAML代码中使用它
<phone:PhoneApplicationPage
...
xmlns:phoneshell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
phoneshell:SystemTray.IsVisible="True"
phoneshell:SystemTray.BackgroundColor="Blue">发布于 2014-04-03 01:10:36
从代码中,你可以尝试:
SystemTray.ForegroundColor = new System.Windows.Media.Color() { R = _r, G = _g, B = _b };https://stackoverflow.com/questions/22812151
复制相似问题