Share via


PointHitTestParameters.HitPoint Propiedad

Definición

Obtiene el objeto Point con el que se va a realizar la prueba de posicionamiento.

public:
 property System::Windows::Point HitPoint { System::Windows::Point get(); };
public System.Windows.Point HitPoint { get; }
member this.HitPoint : System.Windows.Point
Public ReadOnly Property HitPoint As Point

Valor de propiedad

Point con el que se va a realizar la prueba de posicionamiento.

Ejemplos

En el ejemplo siguiente se muestra cómo invalidar la compatibilidad de la prueba de posicionamiento predeterminada en un objeto visual definido por el usuario. En este caso, el HitPoint valor se devuelve simplemente como parte de PointHitTestResult.

// Override default hit test support in visual object.
protected override HitTestResult HitTestCore(PointHitTestParameters hitTestParameters)
{
    Point pt = hitTestParameters.HitPoint;

    // Perform custom actions during the hit test processing,
    // which may include verifying that the point actually
    // falls within the rendered content of the visual.

    // Return hit on bounding rectangle of visual object.
    return new PointHitTestResult(this, pt);
}
' Override default hit test support in visual object.
Protected Overrides Overloads Function HitTestCore(ByVal hitTestParameters As PointHitTestParameters) As HitTestResult
    Dim pt As Point = hitTestParameters.HitPoint

    ' Perform custom actions during the hit test processing,
    ' which may include verifying that the point actually
    ' falls within the rendered content of the visual.

    ' Return hit on bounding rectangle of visual object.
    Return New PointHitTestResult(Me, pt)
End Function

Se aplica a