Share via


ContainerVisual.DescendantBounds Propriété

Définition

Obtient l'union de tous les cadres englobants de contenu de tous les descendant du ContainerVisual, mais pas le contenu du ContainerVisual.

public:
 property System::Windows::Rect DescendantBounds { System::Windows::Rect get(); };
public System.Windows.Rect DescendantBounds { get; }
member this.DescendantBounds : System.Windows.Rect
Public ReadOnly Property DescendantBounds As Rect

Valeur de propriété

Rect

Rect qui spécifie le cadre englobant de combinaison.

Exemples

L’exemple suivant montre comment récupérer le rectangle englobant des descendants d’un ContainerVisual objet.

// Return the bounding rectangle for the ContainerVisual.
Rect rectBounds = containerVisual.ContentBounds;

// Expand the rectangle to include the bounding rectangle
// of the all of the ContainerVisual's descendants.
rectBounds.Union(containerVisual.DescendantBounds);
' Return the bounding rectangle for the ContainerVisual.
Dim rectBounds As Rect = containerVisual.ContentBounds

' Expand the rectangle to include the bounding rectangle
' of the all of the ContainerVisual's descendants.
rectBounds.Union(containerVisual.DescendantBounds)

Remarques

Obtenez la ContentBounds propriété pour renvoyer le rectangle de cadre englobant mis en cache pour le ContainerVisual rectangle lui-même.

S’applique à