TreeWalker Class
TOC
Collapse the table of content
Expand the table of content

TreeWalker Class

 

Provides methods and properties used to navigate the UI Automation tree.

Namespace:   System.Windows.Automation
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

System.Object
  System.Windows.Automation.TreeWalker

public sealed class TreeWalker

NameDescription
System_CAPS_pubmethodTreeWalker(Condition)

Initializes a new instance of the TreeWalker class.

NameDescription
System_CAPS_pubpropertyCondition

Gets the object that defines the view for the TreeWalker object.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetFirstChild(AutomationElement)

Retrieves the first child element of the specified AutomationElement.

System_CAPS_pubmethodGetFirstChild(AutomationElement, CacheRequest)

Retrieves the first child element of the specified AutomationElement and caches properties and patterns.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLastChild(AutomationElement)

Retrieves the last child element of the specified AutomationElement.

System_CAPS_pubmethodGetLastChild(AutomationElement, CacheRequest)

Retrieves the last child element of the specified AutomationElement and caches properties and patterns.

System_CAPS_pubmethodGetNextSibling(AutomationElement)

Retrieves the next sibling element of the specified AutomationElement.

System_CAPS_pubmethodGetNextSibling(AutomationElement, CacheRequest)

Retrieves the next sibling element of the specified AutomationElement and caches properties and patterns.

System_CAPS_pubmethodGetParent(AutomationElement)

Retrieves the parent element of the specified AutomationElement.

System_CAPS_pubmethodGetParent(AutomationElement, CacheRequest)

Retrieves the parent element of the specified AutomationElement and caches properties and patterns.

System_CAPS_pubmethodGetPreviousSibling(AutomationElement)

Retrieves the previous sibling of the specified AutomationElement.

System_CAPS_pubmethodGetPreviousSibling(AutomationElement, CacheRequest)

Retrieves the previous sibling of the specified AutomationElement and caches properties and patterns.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodNormalize(AutomationElement)

Retrieves the node itself, if it satisfies the Condition, or the nearest parent or ancestor node that satisfies the Condition.

System_CAPS_pubmethodNormalize(AutomationElement, CacheRequest)

Retrieves the node itself, if it satisfies the Condition, or the nearest parent or ancestor node that satisfies the Condition, and caches properties and patterns.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticContentViewWalker

Represents a predefined TreeWalker containing a view of elements in the tree that are marked as content controls.

System_CAPS_pubfieldSystem_CAPS_staticControlViewWalker

Represents a predefined TreeWalker containing a view of elements in the tree that are marked as controls.

System_CAPS_pubfieldSystem_CAPS_staticRawViewWalker

Represents a predefined TreeWalker containing a view of all the elements in the tree.

UI Automation clients view the UI Automation elements on the desktop as a set of AutomationElement objects arranged in a tree structure.

Using the TreeWalker class, a client application can navigate the UI Automation tree by selecting a view of the tree and stepping from one AutomationElement to another in a specified direction using the GetFirstChild, GetLastChild, GetPreviousSibling, GetNextSibling, and GetParent methods.

Navigating the UI Automation tree using TreeWalker can result in cross-process calls and is not as efficient as locating an element using the FindAll or FindFirst methods.

If your client application might try to find elements in its own user interface, you must make all UI Automation calls on a separate thread.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft