如何设置系统托盘颜色 [英] How to Set SystemTray Color

查看:39
本文介绍了如何设置系统托盘颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图更改 SystemTray 的颜色,但由于某种原因我无法使其正常工作.我不确定我做错了什么.

I was attempting to change the color of the SystemTray, but for some reason I cannot get it to work correctly. I am not sure what I am doing wrong.

shell:SystemTray.IsVisible="True"
shell:SystemTray.BackgroundColor="Cyan"

这不正确吗?

推荐答案

shell:SystemTray.IsVisible="True"
shell:SystemTray.BackgroundColor="Cyan"

是正确的解决方案.我正在使用 NuGet 的 PhoneThemeManager,它会自动覆盖设备默认设置以强制使用浅色或深色主题.使用上述代码设置 SystemTray.Background 会导致背景为白色.不确定如何解决这个特定问题,但在所有其他情况下,上述代码应该可以工作.

Is the proper solution. I am using PhoneThemeManager from NuGet which automatically overrides device defaults to force either light or dark theme. Setting the SystemTray.Background using the above code is causing the Background to be white. Not sure how to fix this specific issue, but in all other cases the above code should work.

这篇关于如何设置系统托盘颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆