AutomationElementMode 列挙型

定義

UI オートメーション要素を返すときに使用する参照の種類を指定する値が含まれています。 これらの値は、AutomationElementMode プロパティで使用されます。

public enum class AutomationElementMode
public enum AutomationElementMode
type AutomationElementMode = 
Public Enum AutomationElementMode
継承
AutomationElementMode

フィールド

名前 説明
None 0

返される要素に基になる UI への参照がなく、キャッシュされた情報のみが含まれていることを指定します。 このモードは、たとえば、アイテム自体への参照を取得せずにリスト ボックス内の項目の名前を取得するために使用できます。

Full 1

返される要素が基になる 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 への参照を持たないことを指定し、キャッシュされた情報のみを含みます。

GetCurrentPropertyValueSetFocusなどの要素に対する特定の操作には、完全な参照が必要です。何も含まれていない要素に対してこれらを実行しようとすると、InvalidOperationException

プロパティのみが必要な場合は、None を使用する方が効率的です。完全な参照の設定に伴うオーバーヘッドを回避できます。

適用対象

こちらもご覧ください