IntersectionDetail IntersectionDetail IntersectionDetail IntersectionDetail Enum

정의

GeometryHitTestParameters의 기하 도형과 적중된 표시의 교차에 대한 정보를 제공합니다.Provides information about the intersection between the geometries in the GeometryHitTestParameters and the visual which was hit.

public enum class IntersectionDetail
public enum IntersectionDetail
type IntersectionDetail = 
Public Enum IntersectionDetail
상속
IntersectionDetailIntersectionDetailIntersectionDetailIntersectionDetail

필드

Empty Empty Empty Empty 1

Geometry 적중 테스트 매개 변수와 대상 표시 또는 기하 도형이 교차하지 않습니다.The Geometry hit test parameter and the target visual, or geometry, do not intersect.

FullyContains FullyContains FullyContains FullyContains 3

Geometry 적중 테스트 매개 변수가 대상 표시 또는 기하 도형의 범위에 완전히 포함됩니다.The Geometry hit test parameter is fully contained within the boundary of the target visual or geometry.

FullyInside FullyInside FullyInside FullyInside 2

대상 표시 또는 기하 도형이 완전히 Geometry 적중 테스트 매개 변수 내에 있습니다.The target visual, or geometry, is fully inside the Geometry hit test parameter.

Intersects Intersects Intersects Intersects 4

Geometry 적중 테스트 매개 변수와 대상 표시 또는 기하 도형이 교차합니다.The Geometry hit test parameter and the target visual, or geometry, intersect. 이는 두 요소가 서로를 포함하지 않고 겹침을 의미합니다.This means that the two elements overlap, but neither element contains the other.

NotCalculated NotCalculated NotCalculated NotCalculated 0

IntersectionDetail 값이 계산되지 않았습니다.The IntersectionDetail value is not calculated.

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다 합니다 IntersectionDetail 속성의 GeometryHitTestResult합니다.The following example shows how to use the IntersectionDetail property of GeometryHitTestResult.

// Return the result of the hit test to the callback.
public HitTestResultBehavior MyHitTestResultCallback(HitTestResult result)
{
    // Retrieve the results of the hit test.
    IntersectionDetail intersectionDetail = ((GeometryHitTestResult)result).IntersectionDetail;

    switch (intersectionDetail)
    {
        case IntersectionDetail.FullyContains:

            // Add the hit test result to the list that will be processed after the enumeration.
            hitResultsList.Add(result.VisualHit);

            return HitTestResultBehavior.Continue;

        case IntersectionDetail.Intersects:

            // Set the behavior to return visuals at all z-order levels.
            return HitTestResultBehavior.Continue;

        case IntersectionDetail.FullyInside:

            // Set the behavior to return visuals at all z-order levels.
            return HitTestResultBehavior.Continue;

        default:
            return HitTestResultBehavior.Stop;
    }
}
' Return the result of the hit test to the callback.
Public Function MyHitTestResultCallback(ByVal result As HitTestResult) As HitTestResultBehavior
    ' Retrieve the results of the hit test.
    Dim intersectionDetail As IntersectionDetail = (CType(result, GeometryHitTestResult)).IntersectionDetail

    Select Case intersectionDetail
        Case IntersectionDetail.FullyContains

            ' Add the hit test result to the list that will be processed after the enumeration.
            hitResultsList.Add(result.VisualHit)

            Return HitTestResultBehavior.Continue

        Case IntersectionDetail.Intersects

            ' Set the behavior to return visuals at all z-order levels.
            Return HitTestResultBehavior.Continue

        Case IntersectionDetail.FullyInside

            ' Set the behavior to return visuals at all z-order levels.
            Return HitTestResultBehavior.Continue

        Case Else
            Return HitTestResultBehavior.Stop
    End Select
End Function

설명

다음 그림에서는 적중 횟수 테스트 기 하 도형 (파란색 원) 및 visual 기 하 도형 (빨간색 사각형) 간의 관계를 보여 줍니다.The following illustration shows the relationship between the hit test geometry (the blue circle) and the visual geometry (the red square).

적중 테스트에서 사용 되는 IntersectionDetail의 다이어그램Diagram of IntersectionDetail used in hit testing
교집합 visual 기 하 도형 적중된 테스트 기 하 도형과 적중 횟수 테스트 중Intersection between hit test geometry and visual geometry during hit testing

적용 대상