wpf Mahapps 自定义标题栏颜色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32498691/
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
Mahapps Custom title bar color
提问by berry wer
Currently i am using <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
目前我正在使用 <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
And this is the result:
这是结果:
I also found this supported colors: https://github.com/MahApps/MahApps.Metro/tree/master/MahApps.Metro/Styles/Accents
我还发现了这种支持的颜色:https: //github.com/MahApps/MahApps.Metro/tree/master/MahApps.Metro/Styles/Accents
But i cannot find the Graycolor that i want to change into.
Any idea how to change to custom color ?
但是我找不到Gray我想变成的颜色。知道如何更改为自定义颜色吗?
回答by punker76
You can set the title brush to whatever you want by setting WindowTitleBrush="Chocolate"
您可以通过设置将标题画笔设置为您想要的任何内容 WindowTitleBrush="Chocolate"
<Controls:MetroWindow x:Class="MetroDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:MetroDemo="clr-namespace:MetroDemo"
Title="MahApps.Metro - Demo Application"
WindowTitleBrush="Chocolate">
</Controls:MetroWindow>
Hope this helps!
希望这可以帮助!


