ContainerVisual.DescendantBounds Właściwość

Definicja

Pobiera połączenie wszystkich pól ograniczenia zawartości dla wszystkich elementów potomnych ContainerVisualobiektu , ale nie uwzględnia zawartości obiektu 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

Wartość właściwości

Rect

Element Rect określający pole ograniczenia kombinacji.

Przykłady

W poniższym przykładzie pokazano, jak pobrać prostokąt ContainerVisual ograniczenia obiektów podrzędnych obiektu.

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

Uwagi

Pobierz właściwość , ContentBounds aby zwrócić prostokąt pola ograniczenia buforowanego dla ContainerVisual samego siebie.

Dotyczy