【发布时间】:2017-01-12 22:01:13
【问题描述】:
如何以编程方式获取 UWP 标题栏颜色?
我可以通过以下方式轻松设置自定义标题栏颜色:
ApplicationView.GetForCurrentView().TitleBar.BackgroundColor
ApplicationView.GetForCurrentView().TitleBar.ForegroundColor
但是如何获取系统标题栏颜色呢?
例如。如果用户设置 在标题栏上显示颜色 选项并使用 黄色 作为 Windows 强调色,则 UWP 应用标题栏 BackgroundColor 为 黄色。
但是ApplicationView.GetForCurrentView().TitleBar.BackgroundColor 返回null。
【问题讨论】: