benruehl / adonis-ui

Lightweight UI toolkit for WPF applications offering classic but enhanced windows visuals
https://benruehl.github.io/adonis-ui/
MIT License
1.73k stars 145 forks source link

TreeView - No effects on item mouseover #66

Closed Swiftpaws closed 4 years ago

Swiftpaws commented 4 years ago

Describe the bug When utilizing the treeview items on mouseover do not highlight correctly. Tested with .net Core 3, .net core 3.1, .net 4.8 and .net 4.7.2

Somehow this is not the case in the demo application and I cannot wrap my head around why it works there and nowhere else. (Maybe because the view is a resource dictionary ?)

To Reproduce I have created an example app with code taken from the demo application https://github.com/Swiftpaws/AdonisTreeView-Mouseover

Expected behavior Mouseover highlight (border)

benruehl commented 4 years ago

Thanks for reporting this.

This was a tough one. Although I fixed it now, I cannot tell you what is different in your demo app. Copying your MainWindow.xaml to AdonisUI.Demo resulted in a working TreeView so it was not about using a ResourceDictionary.

Anyway, explicitly writing {Binding Path=X instead of {Binding X in the style fixed it. This was not the first time this detail was important.