GeometryHitTestResult(Visual, IntersectionDetail) GeometryHitTestResult(Visual, IntersectionDetail) GeometryHitTestResult(Visual, IntersectionDetail) Constructor

Definición

Inicializa una nueva instancia de la clase GeometryHitTestResult utilizando el objeto visual especificado y el valor de IntersectionDetail.Initializes a new instance of the GeometryHitTestResult class by using a specified visual object and IntersectionDetail value.

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

Parámetros

visualHit
Visual Visual Visual

Objeto visual al que se obtiene acceso durante una prueba de posicionamiento.The visual object that is hit during a hit test.

intersectionDetail
IntersectionDetail IntersectionDetail IntersectionDetail

Describe la intersección entre Geometry y visualHit.Describes the intersection between a Geometry and visualHit.

Ejemplos

En el ejemplo siguiente se muestra cómo crear GeometryHitTestResult un objeto y usarlo como valor devuelto para una implementación invalidada HitTestCorede.The following example shows how to create a GeometryHitTestResult object and use it as a return value for an overridden implementation of 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