Mahapps Custom title bar color

berry wer picture berry wer · Sep 10, 2015 · Viewed 9.7k times · Source

Currently i am using <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />

And this is the result:

enter image description here

I also found this supported colors: https://github.com/MahApps/MahApps.Metro/tree/master/MahApps.Metro/Styles/Accents

But i cannot find the Gray color that i want to change into. Any idea how to change to custom color ?

Answer

punker76 picture punker76 · Sep 10, 2015

You can set the title brush to whatever you want by setting 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!