Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
385
UIElement from point
posted

If I don't have the parent UIElement, how can I get the UIElement from a point?  Say if the mouse was just over a UIElement, how can I determine which is the lowest level one under the mouse? I don't have an UIElement to call UIElement.ElementFromPoint(), but I do have a point...

Parents
No Data
Reply
  • 37774
    posted

    There is no way to do this without having some sort of UIElement to work with.  You could call GetChildAtPoint from the form or main container to see which control you are over, but from that point you will have to know which control you have and get the UIElement from it accordingly.

    -Matt

Children