Aracılığıyla paylaş


PointHitTestParameters.HitPoint Özellik

Tanım

Teste Point isabet edeni alır.

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

Özellik Değeri

Point

Testin Point isabet ettiği yer.

Örnekler

Aşağıdaki örnekte, kullanıcı tanımlı bir görsel nesnede varsayılan isabet testi desteğini geçersiz kılma işlemi gösterilmektedir. Bu durumda, değeri yalnızca öğesinin HitPoint PointHitTestResultbir parçası olarak döndürülür.

// 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

Şunlara uygulanır