It seems that the whole way of extracting an element under the mouse is related to testing Visual Hit.
Is there some mechanism that I am missing that will allow me to grab the actual UIElement that represents the current visual tree returned by HitTest ?
Summary of what I am doing:
I have my own hint class that relies on doing something based on the UIElement that the mouse has ended.
Simply put, it hooks into its own Window PreviewMouseMove event and updates the "current item". This current item should represent the UIElement that the mouse is currently on top of.
Unfortunately, everything I came across with Mouse.DirectlyOver , VisualTreeHelper.HitTest (included callbacks), does not work.
Can someone give an idea on how to accomplish a seemingly simple task in WPF in a Window MouseMove ?
source share