I have a WPF Windows application. I need to change the background color of the title bar. How can I do that?
<Button x:Name="MaximizeButton" Style="{StaticResource MaximizeButtonStyle}" /> </Grid> <Button x:Name="CloseButton" Background="Red" Style="{StaticResource CloseButtonStyle}" /> </StackPanel>
In WPF the titlebar is part of the non-client area, which can't be modified through the WPF window class. You need to manipulate the Win32 handles (if I remember correctly). – Lyle S. @LyleS.
Navigate to the Properties window, and click the Background drop-down arrow, and choose Red or another color in the color picker.
In WPF the titlebar is part of the non-client area, which can't be modified through the WPF window class. You need to manipulate the Win32 handles (if I remember correctly).
This article could be helpful for you: Custom Window Chrome
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With