在 WPF 中更改窗口的标题栏颜色。
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44177028/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Change title bar color of window in WPF.
提问by Dipak
I new for WPF application. My requirement is to change the color of the title bar to blue color. I search a lot for the same thing but I failed to find out the way to achieve it. Thanks.
我是 WPF 应用程序的新手。我的要求是将标题栏的颜色更改为蓝色。我搜索了很多相同的东西,但我没有找到实现它的方法。谢谢。
回答by Gareth
You need to set the WindowStyle="None" and then build your own window as this question How to create custom window chrome in wpf?suggests.
您需要设置 WindowStyle="None" 然后构建自己的窗口作为这个问题How to create custom window chrome in wpf? 建议。
回答by Kelly
You need to use your own custom chrome. Can use community projects like MahApps.Metro to help you with this.
您需要使用自己的自定义 chrome。可以使用像 MahApps.Metro 这样的社区项目来帮助你解决这个问题。

