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

Определение

Инициализирует новый экземпляр класса GeometryHitTestResult, используя указанный визуальный объект и значение 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

Параметры

visualHit
Visual Visual Visual

Визуальный объект, нажатие которого обнаружено в результате проверки нажатия.The visual object that is hit during a hit test.

intersectionDetail
IntersectionDetail IntersectionDetail IntersectionDetail

Описывает пересечение между Geometry и visualHit.Describes the intersection between a Geometry and visualHit.

Примеры

В следующем примере показано, как создать GeometryHitTestResult объект и использовать его в качестве возвращаемого значения для переопределенной HitTestCoreреализации.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

Применяется к