IntersectionDetail Sabit listesi

Tanım

İçindeki ve içindeki geometriler arasındaki kesişmeyle ilgili bilgiler sağlar 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
Devralma
IntersectionDetail

Alanlar

Empty 1

Geometryİsabet testi parametresi ve hedef görsel veya geometri, kesişmez.The Geometry hit test parameter and the target visual, or geometry, do not intersect.

FullyContains 3

Geometryİsabet testi parametresi, hedef görselin veya geometrinin sınırları içinde tam olarak bulunur.The Geometry hit test parameter is fully contained within the boundary of the target visual or geometry.

FullyInside 2

Hedef görsel veya geometri, tam olarak Geometry isabet testi parametresinin içindedir.The target visual, or geometry, is fully inside the Geometry hit test parameter.

Intersects 4

Geometryİsabet testi parametresi ve hedef görsel veya geometri, Kesiştir.The Geometry hit test parameter and the target visual, or geometry, intersect. Diğer bir deyişle, iki öğe örtüşüyor, ancak hiçbir öğe diğerini içermez.This means that the two elements overlap, but neither element contains the other.

NotCalculated 0

IntersectionDetailDeğer hesaplanmaz.The IntersectionDetail value is not calculated.

Örnekler

Aşağıdaki örnek öğesinin özelliğinin nasıl kullanılacağını gösterir 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

Açıklamalar

Aşağıdaki çizimde, isabet test geometrisi (mavi daire) ve görsel geometri (kırmızı kare) arasındaki ilişki gösterilmektedir.The following illustration shows the relationship between the hit test geometry (the blue circle) and the visual geometry (the red square).

İsabet testinde kullanılan IntersectionDetail diyagramıDiagram of IntersectionDetail used in hit testing
İsabet sınaması sırasında isabet testi geometrisi ve Visual geometrisi arasında kesişimIntersection between hit test geometry and visual geometry during hit testing

Şunlara uygulanır