다음을 통해 공유


GeometryHitTestResult(Visual, IntersectionDetail) 생성자

정의

지정한 표시 개체와 GeometryHitTestResult 값을 사용하여 IntersectionDetail 클래스의 새 인스턴스를 초기화합니다.

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
Public Sub New (visualHit As Visual, intersectionDetail As IntersectionDetail)

매개 변수

visualHit
Visual

적중 테스트 도중 적중되는 표시 개체입니다.

intersectionDetail
IntersectionDetail

GeometryvisualHit의 교차를 설명합니다.

예제

다음 예제에서는 만드는 방법을 보여 줍니다.는 GeometryHitTestResult 개체의 재정의 된 구현에 대 한 반환 값으로 사용 및 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

적용 대상