Provides utility methods that perform common tasks involving nodes in a visual tree.
Assembly: PresentationCore (in PresentationCore.dll)
Retrieves the cached representation of the specified Visual.
Returns the child visual object from the specified collection index within a specified parent.
Returns the number of children that the specified visual object contains.
Returns the cached bounding box rectangle for the specified Visual.
Returns the cached bounding box rectangle for the specified Visual3D.
Gets the DPI information at which this Visual is measured and rendered.
Returns the drawing content of the specified Visual.
Gets the bitmap effect for the specified Visual.
Returns the offset of the Visual.
Returns the opacity of the Visual.
Returns a DependencyObject value that represents the parent of the visual object.
Returns an X-coordinate (vertical) guideline collection.
Returns a Y-coordinate (horizontal) guideline collection.
|HitTest(Visual^, HitTestFilterCallback^, HitTestResultCallback^, HitTestParameters^)|
|HitTest(Visual3D^, HitTestFilterCallback^, HitTestResultCallback^, HitTestParameters3D^)|
Updates the DPI information of a Visual. It can only be called on a Visual without a parent.
Nodes in the visual tree can be either Visual or Visual3D objects. Methods that are specific to a type of visual object are typed as either Visual or Visual3D. However, some methods in the class can accept a DependencyObject value that represents either type of visual object.
WPF supports programmatic access to several different tree structures of objects. Primarily, this is exposed as a visual tree and a logical tree. In some cases, the logical tree is a more useful representation of the elements in a WPF application, but conceptually the logical tree is implemented at a level beyond the Visual class. Unlike the visual tree, the logical tree can represent nonvisual data objects, such as ListItem. For more information on the logical tree, see Trees in WPF. The logical tree also is supported by a similar utility method class, LogicalTreeHelper.
The following example shows how to enumerate all the descendants of a visual object, which is a technique you might want to use if you were interested in serializing all the rendering information of a visual object hierarchy.
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.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.