VisualTreeHelper Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides utility methods that can used to traverse object relationships (along child object or parent object axes) in the Windows Phone visual tree.

Inheritance Hierarchy


Namespace: System.Windows.Media
Assembly: System.Windows (in System.Windows.dll)


Public NotInheritable Class VisualTreeHelper
public static class VisualTreeHelper

The VisualTreeHelper type exposes the following members.


Name Description
FindElementsInHostCoordinates(Point, UIElement) Retrieves a set of objects that are located within a specified point of an object's coordinate space.
FindElementsInHostCoordinates(Rect, UIElement) Retrieves a set of objects that are located within a specified Rect of an object's coordinate space.
GetChild Using the provided index, obtains a specific child object of the provided object by examining the visual tree.
GetChildrenCount Returns the number of children that exists in an object's child collection in the visual tree.
GetOpenPopups Gets all open Popup controls.
GetParent Returns an object's parent object in the visual tree.



Windows Phone does not expose a Visual class as an extension point, but still provides this helper class so that you can examine the visual tree structure.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

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.

See Also


System.Windows.Media Namespace