Export (0) Print
Expand All

TreeWalker Class

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

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

public final class TreeWalker

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.

System.Object
  System.Windows.Automation.TreeWalker

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft