ContainerVisual.DescendantBounds プロパティ

定義

ContainerVisual のすべての子孫に対するすべてのコンテンツ境界ボックスの結合を取得します。ただし、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

プロパティ値

Rect

組み合わせの境界ボックスを指定する Rect

次の例は、オブジェクトの子孫の外接する四角形を ContainerVisual 取得する方法を示しています。

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

注釈

それ自体の ContentBounds キャッシュされた境界ボックスの四角形を返すプロパティを ContainerVisual 取得します。

適用対象