Skip to main content
A newer version of this page is available.

HitTest

HitTests are used to identify a control’s UI element by its position within this control. Every ViewInfo has a GetHitTest or HitTest method, which receives coordinates of a specific point within a control and returns the HitTest information of the control’s UI element whose bounding rectangle includes this point. In its turn, HitTest provides the ViewInfo information of the associated UI element.

You can obtain a HitTest object either via the ViewInfo.GetHitTest method or via a corresponding property provided by some controls.