HitTestResult.VisualHit 속성

정의

적중된 시각적 개체를 가져옵니다.

public:
 property System::Windows::DependencyObject ^ VisualHit { System::Windows::DependencyObject ^ get(); };
public System.Windows.DependencyObject VisualHit { get; }
member this.VisualHit : System.Windows.DependencyObject
Public ReadOnly Property VisualHit As DependencyObject

속성 값

DependencyObject

적중된 시각적 개체를 나타내는 DependencyObject 값입니다.

예제

다음 예제에서는 검색 하는 방법을 보여 줍니다는 VisualHit 적중된 테스트 콜백 메서드를 속성 값입니다.

// Return the result of the hit test to the callback.
public HitTestResultBehavior MyHitTestResult(HitTestResult result)
{
    // Add the hit test result to the list that will be processed after the enumeration.
    hitResultsList.Add(result.VisualHit);

    // Set the behavior to return visuals at all z-order levels.
    return HitTestResultBehavior.Continue;
}
' Return the result of the hit test to the callback.
Public Function MyHitTestResult(ByVal result As HitTestResult) As HitTestResultBehavior
    ' Add the hit test result to the list that will be processed after the enumeration.
    hitResultsList.Add(result.VisualHit)

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

설명

DependencyObject 형식이 아닌 Visual 적중 테스트에서 뷰포트를 통해 2D 및 3D 트리 브리지 수 있도록 합니다.

적용 대상