Why did setting the color with :pointerover have no effect?#
TL;DR#
Because your style has a lower priority. You need to write a more specific selector to override the styles in the theme:
1 2 3 | |
Details#
This is to ensure properties like background color are responsive. If the template is written like this:
1 2 3 4 | |
When the user sets Background = "Red" directly, hovering the mouse will not change the color, which loses responsiveness. To avoid this, the development team wrote higher-priority selectors in the styles, so you need to write such a long selector to override them.
💖 Provided by kongdetuo
🔗 Original Document Avalonia 常见问题
(Obtained permission from original author,Modified)