PointHitTestParameters.HitPoint PointHitTestParameters.HitPoint PointHitTestParameters.HitPoint PointHitTestParameters.HitPoint Property

定義

ヒット テストの対象となる Point を取得します。Gets the Point against which to 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

プロパティ値

ヒット テストの対象となる PointThe Point against which to hit test.

次の例は、既定値を上書きする方法を示しています。 ヒット テストのサポート、ユーザー定義のビジュアル オブジェクト。The following example shows how to override default hit test support in a user-defined visual object. ここで、HitPointの一部として値が返されるだけPointHitTestResultです。In this case, the HitPoint value is simply returned as part of 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

適用対象