I've googled a lot but I've found nothing about this situation.
I have several flat Button
s with different Background
colors, but the hover color is the same for all of them! I want each Button
has its own hover color based on its background, for example gets a little lighter.
I've tried making custom styles and I reduced the Opacity
in IsMouseOver
trigger, but It's not what I want because it also affects the content of the button and not only the background color!
Win32 C# applications have a Flat Appearance property that do the trick automatically. When you choose a color for the BackColor
and set the button as Flat, it takes care of all states color (Hover color, Disabled color, ...), however I've no idea how to do this in WPF.
Thank you in advance
Copyright Notice:Content Author:「Majid」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/19872683/auto-hover-color-for-buttons-based-on-their-background-color