TreeScope 枚举

定义

包含指定 UI 自动化目录树内元素的范围的值。Contains values that specify the scope of elements within the UI Automation tree.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class TreeScope
[System.Flags]
public enum TreeScope
type TreeScope = 
Public Enum TreeScope
继承
TreeScope
属性

字段

Ancestors 16

指定搜索包括元素的上级(包括父级)。Specifies that the search include the element's ancestors, including the parent. 不支持。Not supported.

Children 2

指定搜索包括元素的直接子级。Specifies that the search include the element's immediate children.

Descendants 4

指定搜索包括元素的子代(包括子级)。Specifies that the search include the element's descendants, including children.

Element 1

指定搜索包括元素本身。Specifies that the search include the element itself.

Parent 8

指定搜索包括元素的父级。Specifies that the search include the element's parent. 不支持。Not supported.

Subtree 7

指定搜索包括搜索的根和全部子代。Specifies that the search include the root of the search and all descendants.

注解

这些值用于指定搜索元素、订阅事件和缓存的范围。These values are used to specify the scope in searching for elements, subscribing to events, and caching.

适用于

另请参阅