ContainerVisual.ContentBounds Propriedade

Definição

Obtém a caixa delimitadora para o conteúdo do ContainerVisual.

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

Valor de Propriedade

A Rect que especifica a caixa delimitadora.

Exemplos

O exemplo seguinte mostra como recuperar o retângulo delimitador de um ContainerVisual objeto.

// 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)

Observações

Use a DescendantBounds propriedade para devolver a união de todas as caixas delimitadoras de conteúdo para todos os descendentes de um ContainerVisual objeto, mas não para o objeto em si.

Aplica-se a