AutomationElementMode 열거형

정의

UI Automation 요소를 반환할 때 사용할 참조 형식을 지정하는 값을 포함합니다. 이러한 값은 AutomationElementMode 속성에 사용됩니다.

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

필드

Full 1

반환된 요소에 기본 UI에 대한 전체 참조가 있음을 지정합니다.

None 0

반환된 요소에 기본 UI에 대한 참조가 없고 캐시된 정보만 포함하도록 지정합니다. 예를 들어 이 모드를 사용하면 항목 자체에 대한 참조를 가져오지 않고도 목록 상자의 항목 이름을 검색할 수 있습니다.

예제

다음 예제에서는 모드를 설정 하는 방법을 보여 줍니다는 CacheRequest합니다.

// Set up the request.
CacheRequest cacheRequest = new CacheRequest();

// Do not get a full reference to the cached objects, only to their cached properties and patterns.
cacheRequest.AutomationElementMode = AutomationElementMode.None;
' Set up the request.
Dim cacheRequest As New CacheRequest()

' Do not get a full reference to the cached objects, only to their cached properties and patterns.
cacheRequest.AutomationElementMode = AutomationElementMode.None

설명

Full은 기본값이며 반환된 요소에 기본 UI(사용자 인터페이스)에 대한 전체 참조가 포함되도록 지정합니다. None 지정 반환 되는 요소는 기본 UI 참조가 아닌 캐시 된 정보만 포함 합니다.

요소에서 특정 작업을 같은 GetCurrentPropertyValue 또는 SetFocus, 전체 참조를 필요로;에서이 수행 하는 none이 있는 요소에서 결과 InvalidOperationException입니다.

None을 사용 하 여 효율적일 수 있는 속성만 필요할 경우 오버 헤드를 방지 하므로 전체 참조를 설정 합니다.

적용 대상

추가 정보