VisualTreeHelper.GetContentBounds Method (Visual)
.NET Framework (current version)
Returns the cached bounding box rectangle for the specified Visual.
PresentationCore (in PresentationCore.dll)
static member GetContentBounds :
reference:Visual -> Rect
Call the GetDescendantBounds method to return the union of all the content bounding boxes for all the descendants of a visual object, which includes the Visual itself.
The following example shows how to retrieve the bounding rectangle of a Visual object.
No code example is currently available or this language may not be supported.
Return to top
Available since 3.0