Visual.HitTestCore Visual.HitTestCore Visual.HitTestCore Visual.HitTestCore Method

정의

점 또는 기하 도형 값이 시각적 개체의 경계 내에 있는지 확인합니다.Determines whether a point or geometry value is within the bounds of the visual object.

오버로드

HitTestCore(GeometryHitTestParameters) HitTestCore(GeometryHitTestParameters) HitTestCore(GeometryHitTestParameters) HitTestCore(GeometryHitTestParameters)

기하 도형 값이 시각적 개체의 경계 내에 있는지 확인합니다.Determines whether a geometry value is within the bounds of the visual object.

HitTestCore(PointHitTestParameters) HitTestCore(PointHitTestParameters) HitTestCore(PointHitTestParameters) HitTestCore(PointHitTestParameters)

점 좌표 값이 시각적 개체의 경계 내에 있는지 확인합니다.Determines whether a point coordinate value is within the bounds of the visual object.

HitTestCore(GeometryHitTestParameters) HitTestCore(GeometryHitTestParameters) HitTestCore(GeometryHitTestParameters) HitTestCore(GeometryHitTestParameters)

기하 도형 값이 시각적 개체의 경계 내에 있는지 확인합니다.Determines whether a geometry value is within the bounds of the visual object.

protected:
 virtual System::Windows::Media::GeometryHitTestResult ^ HitTestCore(System::Windows::Media::GeometryHitTestParameters ^ hitTestParameters);
protected virtual System.Windows.Media.GeometryHitTestResult HitTestCore (System.Windows.Media.GeometryHitTestParameters hitTestParameters);
abstract member HitTestCore : System.Windows.Media.GeometryHitTestParameters -> System.Windows.Media.GeometryHitTestResult
override this.HitTestCore : System.Windows.Media.GeometryHitTestParameters -> System.Windows.Media.GeometryHitTestResult
Protected Overridable Function HitTestCore (hitTestParameters As GeometryHitTestParameters) As GeometryHitTestResult

매개 변수

hitTestParameters
GeometryHitTestParameters GeometryHitTestParameters GeometryHitTestParameters GeometryHitTestParameters

적중 테스트를 수행할 대상 GeometryHitTestParameters를 지정하는 Geometry 개체입니다.A GeometryHitTestParameters object that specifies the Geometry to hit test against.

반환

적중 테스트 결과를 나타내는 GeometryHitTestResult입니다.A GeometryHitTestResult that represents the result of the hit test.

예제

다음 예제에서는 HitTestCore(GeometryHitTestParameters) 메서드를 재정의하는 방법을 보여 줍니다.The following example shows how to override the HitTestCore(GeometryHitTestParameters) method. 이 메서드를 재정의 하려는 이유 중 하나는 적중된 테스트 프로세스 중 추가 기능을 제공 합니다.One reason you might want to override this method is to provide additional functionality during the hit testing process.

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

설명

기본 시각적 개체에 대 한 지원 하 여 적중 테스트 재정의 재정의할 수 있습니다는 HitTestCore 메서드.You can override default hit testing support for a visual object by overriding the HitTestCore method. 즉, 호출 하는 HitTest 메서드를 재정의 된 구현 HitTestCore 라고 합니다.This means that when you invoke the HitTest method, your overridden implementation of HitTestCore is called. 재정의 된 메서드는 좌표가 시각적 개체의 기 하 도형 밖에 있는 경우에 시각적 개체의 경계 사각형 내에 적중된 테스트를 포함 하는 경우 호출 됩니다.Your overridden method is called when a hit test falls within the bounding rectangle of the visual object, even if the coordinate falls outside the geometry of the visual object.

HitTestCore(PointHitTestParameters) HitTestCore(PointHitTestParameters) HitTestCore(PointHitTestParameters) HitTestCore(PointHitTestParameters)

점 좌표 값이 시각적 개체의 경계 내에 있는지 확인합니다.Determines whether a point coordinate value is within the bounds of the visual object.

protected:
 virtual System::Windows::Media::HitTestResult ^ HitTestCore(System::Windows::Media::PointHitTestParameters ^ hitTestParameters);
protected virtual System.Windows.Media.HitTestResult HitTestCore (System.Windows.Media.PointHitTestParameters hitTestParameters);
abstract member HitTestCore : System.Windows.Media.PointHitTestParameters -> System.Windows.Media.HitTestResult
override this.HitTestCore : System.Windows.Media.PointHitTestParameters -> System.Windows.Media.HitTestResult
Protected Overridable Function HitTestCore (hitTestParameters As PointHitTestParameters) As HitTestResult

매개 변수

hitTestParameters
PointHitTestParameters PointHitTestParameters PointHitTestParameters PointHitTestParameters

적중 테스트를 수행할 대상 PointHitTestParameters를 지정하는 Point 개체입니다.A PointHitTestParameters object that specifies the Point to hit test against.

반환

적중 테스트에서 반환되는 HitTestResult을 나타내는 Visual입니다.A HitTestResult that represents the Visual that is returned from a hit test.

예제

다음 예제에서는 HitTestCore(PointHitTestParameters) 메서드를 재정의하는 방법을 보여 줍니다.The following example shows how to override the HitTestCore(PointHitTestParameters) method. 이 메서드를 재정의 하려는 이유 중 하나는 적중된 테스트 프로세스 중 추가 기능을 제공 합니다.One reason you might want to override this method is to provide additional functionality during the hit testing process.

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

설명

기본 적중 지원 시각적 개체에서 재정의 하 여 테스트를 재정의할 수 있습니다는 HitTestCore 메서드.You can override the default hit testing support on visual objects by overriding the HitTestCore method. 즉, 호출 하는 HitTest 메서드를 재정의 된 구현 HitTestCore 라고 합니다.This means that when you invoke the HitTest method, your overridden implementation of HitTestCore is called. 재정의 된 메서드는 좌표가 시각적 개체의 기 하 도형 밖에 있는 경우에 시각적 개체의 경계 사각형 내에 적중된 테스트를 포함 하는 경우 호출 됩니다.Your overridden method is called when a hit test falls within the bounding rectangle of the visual object, even if the coordinate falls outside the geometry of the visual object.

적용 대상