ContainerVisual.ContentBounds Свойство
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Возвращает ограничивающее поле для содержимого 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
Значение свойства
Значение, 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)
Комментарии
DescendantBounds Используйте свойство, чтобы вернуть объединение всех ограничивающих содержимого ContainerVisual полей для всех потомков объекта, но не самого объекта.