This topic has not yet been rated - Rate this topic

VisualTreeHelper Class

April 12, 2014

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

System.Object
  System.Windows.Media.VisualTreeHelper

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
'Declaration
Public NotInheritable Class VisualTreeHelper

The VisualTreeHelper type exposes the following members.

  NameDescription
Public methodStatic memberFindElementsInHostCoordinates(Point, UIElement)Retrieves a set of objects that are located within a specified point of an object's coordinate space.
Public methodStatic memberFindElementsInHostCoordinates(Rect, UIElement)Retrieves a set of objects that are located within a specified Rect of an object's coordinate space.
Public methodStatic memberGetChildUsing the provided index, obtains a specific child object of the provided object by examining the visual tree.
Public methodStatic memberGetChildrenCountReturns the number of children that exists in an object's child collection in the visual tree.
Public methodStatic memberGetOpenPopupsGets all open Popup controls.
Public methodStatic memberGetParentReturns an object's parent object in the visual tree.
Top

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.