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
145
First Row of Empty Cell Area
posted

Is there a way to tell whether the mouse click is at the first row of the empty row area?

Hong

  • 69832
    Suggested Answer
    Offline posted

    I'm not sure what constitutes a "row" in this context, but you can use the UIElement.ElementFromPoint method to hit test for a particular UIElement type, and once you have a reference to a UIElement, you can then use the Rect property to get its bounds, and compare the client coordinates of the cursor position to that Rectangle to know where you are with respect to that element.