PointHitTestParameters.HitPoint Proprietà

Definizione

Ottiene la struttura Point su cui eseguire l'hit test.

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

Valore della proprietà

Point

Struttura Point su cui eseguire l'hit test.

Esempio

Nell'esempio seguente viene illustrato come eseguire l'override del supporto di hit test predefinito in un oggetto visivo definito dall'utente. In questo caso, il HitPoint valore viene semplicemente restituito come parte di 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

Si applica a