System.Windows.Automation N ...


.NET Framework Class Library
TreeWalker Class

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

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

Visual Basic (Declaration)
Public NotInheritable Class TreeWalker
Visual Basic (Usage)
Dim instance As TreeWalker
C#
public sealed class TreeWalker
Visual C++
public ref class TreeWalker sealed
JScript
public final class TreeWalker
Remarks

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.

Inheritance Hierarchy

System..::.Object
  System.Windows.Automation..::.TreeWalker
Thread Safety

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

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Other Resources

Tags :


Page view tracker