Change Hover Color for all Controls #6369
-
Hi, I want to change the default hover color of all the controls in my application. I am using the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
There is a file https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Accents/AccentColors.xaml with accent colors. You can redefine them or replace whole file. And there are specific controls color resources https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml . You also can redefine them or replace whole file. By redefining I mean creating your own style-resources file with putting brushes with the same key but your color value in there. This approach is recommended and simpler, but there might be issues with some specific controls (new value can be ignored). By replacing whole file I mean replacing FluentTheme style include from App.xaml and instead including theme parts manually. I.e. if you open FluentDark content - https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/FluentDark.xaml , you will see it's simple and you can copy that into your application instead of |
Beta Was this translation helpful? Give feedback.
There is a file https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Accents/AccentColors.xaml with accent colors. You can redefine them or replace whole file.
And there are specific controls color resources https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml . You also can redefine them or replace whole file.
By redefining I mean creating your own style-resources file with putting brushes with the same key but your color value in there. This approach is recommended and simpler, but there might be issues with some specific controls (new value can be ignored).
By replacing whole file I mean replacing…