Share via


PointHitTestResult.VisualHit 속성

정의

적중 횟수 테스트 결과에서 반환되는 시각적 개체를 가져옵니다.

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

속성 값

Visual

적중 횟수 테스트 결과를 나타내는 Visual 개체입니다.

예제

다음 예제에서는 액세스 하는 방법을 보여 줍니다는 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

설명

VisualHit 값 단일 적중 횟수 테스트 중 여러 시각적 개체를 나타낼 수 있습니다. 적중 테스트 콜백 메서드는 시각적 트리의 특정 시각적 개체에서 적중 테스트가 식별될 때 수행하는 작업을 정의합니다. 반환 된 작업을 수행한 후를 HitTestResultBehavior 다른 시각적 개체의 열거를 계속할지 여부를 결정 하는 값입니다. 반환 된 시각적 개체의 열거형 순서가 렌더링 평면상의 z-순서에 따라 합니다.

적용 대상