AutomationElement.RootElement 속성

정의

현재 데스크톱의 루트 AutomationElement를 가져옵니다.

public:
 static property System::Windows::Automation::AutomationElement ^ RootElement { System::Windows::Automation::AutomationElement ^ get(); };
public static System.Windows.Automation.AutomationElement RootElement { get; }
member this.RootElement : System.Windows.Automation.AutomationElement
Public Shared ReadOnly Property RootElement As AutomationElement

속성 값

AutomationElement

루트 요소입니다.

예제

다음 예제 코드 데스크톱의 모든 직계 자식 컬렉션을 검색 합니다.

AutomationElementCollection desktopChildren =
    AutomationElement.RootElement.FindAll(
    TreeScope.Children, Condition.TrueCondition);
Dim desktopChildren As AutomationElementCollection
desktopChildren = AutomationElement.RootElement.FindAll( _
    TreeScope.Children, Condition.TrueCondition)

설명

사용할 수 루트 요소 시작 지점으로 다른 요소를 찾는 데 사용 하는 FindAllFindFirst 메서드.

루트 요소를 검색할 때 지정 해야 Children 검색의 범위에 있지 Descendants합니다. 데스크톱의 전체 하위 트리를 통해 검색 수천 개의 항목을 반복을 스택 오버플로가 발생할 수 있습니다.

적용 대상