HitTestResultBehavior 열거형

정의

적중 횟수 테스트 중에 남은 시각적 개체의 열거를 계속할지 여부를 확인합니다.

public enum class HitTestResultBehavior
public enum HitTestResultBehavior
type HitTestResultBehavior = 
Public Enum HitTestResultBehavior
상속
HitTestResultBehavior

필드

Continue 1

시각적 트리 계층 구조에 있는 다음 시각적 개체에 대해 적중 횟수 테스트를 계속합니다.

Stop 0

이후의 적중 횟수 테스트를 중지하고 콜백에서 반환합니다.

예제

다음 예제에서는 반환 하는 방법을 보여 줍니다는 HitTestResultBehavior 결과 콜백 메서드에서 적중 횟수 테스트의 값입니다.

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

설명

때 적중된 테스트를 수행 하는 동작을 정의 하는 콜백 메서드는 적중 횟수 테스트 결과 시각적 트리의 특정 시각적 개체에서 식별 됩니다. 반환 된 작업을 수행한 후를 HitTestResultBehavior 다른 시각적 개체의 열거를 계속할지 여부를 결정 하는 값입니다.

해당 기하 도형이 지정된 좌표 값을 포함하는 시각적 트리의 모든 시각적 개체를 열거할 수 있습니다. 적중 테스트 콜백 메서드에서 반환 Continue 하면 적중된 모든 시각적 개체를 식별할 수 있으며, 다른 시각적 개체에 의해 부분적으로 또는 완전히 가려질 수도 있습니다.

적용 대상

추가 정보