This documentation is archived and is not being maintained.

HitTestResultCallback Delegate

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)

public delegate HitTestResultBehavior HitTestResultCallback(
	HitTestResult^ result
)

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

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: