MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.28k stars 2.45k forks source link

Question: How to keep WindowTitleBrush Background Color after loosing focus #3467

Closed Torchok19081986 closed 5 years ago

Torchok19081986 commented 5 years ago

Hallo i have a question. Is it possible to keep WindowTitleBrush Background Color after loosing focus ? i have project a window, where i can show new metrowindow, but if i show new Metrowindow mainwindow looses WindowTitleBrush Background Color and switch it to system color. Current i set color ot Titlebrush WindowTitleBrush="#1BBC9B" like that, but after looses it going to be gray or current windows system color. How can i define or programm my color ?

punker76 commented 5 years ago

@Torchok19081986 You can set the NonActiveWindowTitleBrush property to the same brush

https://github.com/MahApps/MahApps.Metro/blob/b7348bd42bf34a34a52e1613e62a486b6b54850f/src/MahApps.Metro/Controls/MetroWindow.cs#L101