Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HitTestResultCallback Delegate

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Represents a callback that is used to customize hit testing. WPF invokes the HitTestResultCallback to report hit test intersections to the user.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

type HitTestResultCallback = 
    delegate of 
        result:HitTestResult -> HitTestResultBehavior

Parameters

result
Type: System.Windows.Media.HitTestResult

The HitTestResult value that represents a visual object that is returned from a hit test.

Return Value

Type: System.Windows.Media.HitTestResultBehavior

A HitTestFilterBehavior that represents the action resulting from the hit test.

The hit test callback method defines the actions that you perform when a hit test is identified on a particular visual object in the visual tree. After you perform the actions, your callback is expected to return a HitTestResultBehavior value that determines whether to continue iterating through the visual tree for any other visual objects.

The following example shows how to invoke HitTest by using a HitTestResultCallback value. The corresponding hit test callback method is also defined.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft