Szerkesztés

Megosztás a következőn keresztül:


VisualTreeHelper.GetDescendantBounds Method

Definition

Returns the union of all the content bounding boxes for all the descendants of the visual object, which includes the content bounding box of the Visual.

Overloads

GetDescendantBounds(Visual3D)

Returns the union of all the content bounding boxes for all the descendants of the specified Visual3D, which includes the content bounding box of the Visual3D.

GetDescendantBounds(Visual)

Returns the union of all the content bounding boxes for all the descendants of the Visual, which includes the content bounding box of the Visual.

GetDescendantBounds(Visual3D)

Returns the union of all the content bounding boxes for all the descendants of the specified Visual3D, which includes the content bounding box of the Visual3D.

public:
 static System::Windows::Media::Media3D::Rect3D GetDescendantBounds(System::Windows::Media::Media3D::Visual3D ^ reference);
public static System.Windows.Media.Media3D.Rect3D GetDescendantBounds (System.Windows.Media.Media3D.Visual3D reference);
static member GetDescendantBounds : System.Windows.Media.Media3D.Visual3D -> System.Windows.Media.Media3D.Rect3D
Public Shared Function GetDescendantBounds (reference As Visual3D) As Rect3D

Parameters

reference
Visual3D

The 3D visual whose bounding box value for all descendants is computed.

Returns

Returns the bounding box 3D rectangle for the 3D visual.

Remarks

Call the GetContentBounds method to return the cached bounding box rectangle for a 3D visual object.

Applies to

GetDescendantBounds(Visual)

Returns the union of all the content bounding boxes for all the descendants of the Visual, which includes the content bounding box of the Visual.

public:
 static System::Windows::Rect GetDescendantBounds(System::Windows::Media::Visual ^ reference);
public static System.Windows.Rect GetDescendantBounds (System.Windows.Media.Visual reference);
static member GetDescendantBounds : System.Windows.Media.Visual -> System.Windows.Rect
Public Shared Function GetDescendantBounds (reference As Visual) As Rect

Parameters

reference
Visual

The Visual whose bounding box value for all descendants is computed.

Returns

The bounding box rectangle for the specified Visual.

Examples

The following example shows how to retrieve the union of bounding rectangles for the descendants of a Visual.

// Return the bounding rectangle of the parent visual object and all of its descendants.
Rect rectBounds = VisualTreeHelper.GetDescendantBounds(parentVisual);
' Return the bounding rectangle of the parent visual object and all of its descendants.
Dim rectBounds As Rect = VisualTreeHelper.GetDescendantBounds(parentVisual)

Remarks

Call the GetContentBounds method to return the cached bounding box rectangle for a Visual.

Applies to