Compartir a través de


GeometryHitTestResult(Visual, IntersectionDetail) Constructor

Definición

Inicializa una nueva instancia de la clase GeometryHitTestResult utilizando el objeto visual especificado y el valor de IntersectionDetail.

public:
 GeometryHitTestResult(System::Windows::Media::Visual ^ visualHit, System::Windows::Media::IntersectionDetail intersectionDetail);
public GeometryHitTestResult (System.Windows.Media.Visual visualHit, System.Windows.Media.IntersectionDetail intersectionDetail);
new System.Windows.Media.GeometryHitTestResult : System.Windows.Media.Visual * System.Windows.Media.IntersectionDetail -> System.Windows.Media.GeometryHitTestResult
Public Sub New (visualHit As Visual, intersectionDetail As IntersectionDetail)

Parámetros

visualHit
Visual

Objeto visual al que se obtiene acceso durante una prueba de posicionamiento.

intersectionDetail
IntersectionDetail

Describe la intersección entre Geometry y visualHit.

Ejemplos

En el ejemplo siguiente se muestra cómo crear un GeometryHitTestResult objeto y usarlo como un valor devuelto para una implementación invalidada de HitTestCore.

// Override default hit test support in visual object.
protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters)
{
    IntersectionDetail intersectionDetail = IntersectionDetail.NotCalculated;

    // Perform custom actions during the hit test processing.

    return new GeometryHitTestResult(this, intersectionDetail);
}
' Override default hit test support in visual object.
Protected Overrides Overloads Function HitTestCore(ByVal hitTestParameters As GeometryHitTestParameters) As GeometryHitTestResult
    Dim intersectionDetail As IntersectionDetail = IntersectionDetail.NotCalculated

    ' Perform custom actions during the hit test processing.

    Return New GeometryHitTestResult(Me, intersectionDetail)
End Function

Se aplica a