.net 9 theming breaks window background colour, best way to override? #4548
-
Currently if you use a light or dark theme with mahapps metro for a dotnet 9 wpf app the system theme is applied by default to the top level window PART_Border (clipborder). You can see in this example that it renders the dark theme as blue, but it varies depending on the Windows theme setting. Anyone seen this and been able to override it? I just want to apply the standard light/dark theme from mahapps metro and ignore the windows theme (or alternatively use all the colours from the selected windows theme, but not stop using mahapps control in general). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured it out. To stop windows supplying it's own window background theme explicitly set the MahApps windows background brush by setting |
Beta Was this translation helpful? Give feedback.
Figured it out. To stop windows supplying it's own window background theme explicitly set the MahApps windows background brush by setting
Background="{DynamicResource MahApps.Brushes.Window.Background}"
on eachControls:MetroWindow
Window XAML.