VisualTreeHelper::HitTest Method
.NET Framework (current version)
Returns the topmost Visual object of a hit test.
Assembly: PresentationCore (in PresentationCore.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | HitTest(Visual^, HitTestFilterCallback^, HitTestResultCallback^, HitTestParameters^) | Initiates a hit test on the specified Visual, with caller-defined HitTestFilterCallback and HitTestResultCallback methods. |
![]() ![]() | HitTest(Visual^, Point) | |
![]() ![]() | HitTest(Visual3D^, HitTestFilterCallback^, HitTestResultCallback^, HitTestParameters3D^) | Initiates a hit test on the specified Visual3D, with caller-defined HitTestFilterCallback and HitTestResultCallback methods. |
The overloaded methods that take HitTestResultCallback and HitTestFilterCallback as parameters provide additional functionality during hit testing:
Allow you to participate in controlling the visual tree traversal during hit testing.
Allow you to retrieve all of the visuals under the point or geometry, not just the topmost one.
Show:

