HitTestResult::VisualHit Property

 

Gets the visual object that was hit.

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

public:
property DependencyObject^ VisualHit {
	DependencyObject^ get();
}

Property Value

Type: System.Windows::DependencyObject^

A DependencyObject value that represents the visual object that was hit.

DependencyObject is the type rather than Visual so that hit testing can bridge 2D and 3D trees through a viewport.

The following example shows how to retrieve the VisualHit property value in a hit test callback method.

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

.NET Framework
Available since 3.0
Return to top
Show: