我们使用传统用户界面(常用控件,如标签,按钮,标签,文本框等)制作了WPF应用程序。
我们需要添加一个夜视"模式,这将使它看起来像Stellarium的夜视模式,因此它可以在几乎没有光的地方舒适地使用。
据我所知,我们只有两个选择:
问题是:
非常感谢!
答案 0 :(得分:3)
一个建议当然是Mahapps
主题。
您可以通过以下方式在Light和Dark之间切换:
// get the theme from the current application
var theme = ThemeManager.DetectAppStyle(Application.Current);
// now set the Green accent and dark theme
ThemeManager.ChangeAppStyle(Application.Current,
ThemeManager.GetAccent("Green"),
ThemeManager.GetAppTheme("BaseDark"));
或者你可以为每个画笔使用DynamicResource并更改单个ResourceDictionary
,让他们改变点击中的所有内容:)