VisualTreeHelper.GetContentBounds メソッド

定義

Visual のキャッシュされた境界ボックスの四角形を返します。

オーバーロード

GetContentBounds(Visual3D)

指定した Visual3D のキャッシュされた境界ボックスの四角形を返します。

GetContentBounds(Visual)

指定した Visual のキャッシュされた境界ボックスの四角形を返します。

GetContentBounds(Visual3D)

指定した Visual3D のキャッシュされた境界ボックスの四角形を返します。

public:
 static System::Windows::Media::Media3D::Rect3D GetContentBounds(System::Windows::Media::Media3D::Visual3D ^ reference);
public static System.Windows.Media.Media3D.Rect3D GetContentBounds (System.Windows.Media.Media3D.Visual3D reference);
static member GetContentBounds : System.Windows.Media.Media3D.Visual3D -> System.Windows.Media.Media3D.Rect3D
Public Shared Function GetContentBounds (reference As Visual3D) As Rect3D

パラメーター

reference
Visual3D

境界ボックスの値が計算される 3D ビジュアル。

戻り値

Rect3D

Visual3D の境界ボックスの 3D 四角形。

注釈

このメソッドを GetDescendantBounds 使用して、3D ビジュアル オブジェクトのすべての子孫 (それ自体を含む) のすべてのコンテンツ境界ボックスの和集合を Visual3D 返します。

こちらもご覧ください

適用対象

GetContentBounds(Visual)

指定した Visual のキャッシュされた境界ボックスの四角形を返します。

public:
 static System::Windows::Rect GetContentBounds(System::Windows::Media::Visual ^ reference);
public static System.Windows.Rect GetContentBounds (System.Windows.Media.Visual reference);
static member GetContentBounds : System.Windows.Media.Visual -> System.Windows.Rect
Public Shared Function GetContentBounds (reference As Visual) As Rect

パラメーター

reference
Visual

境界ボックスの値が計算される Visual

戻り値

Rect

Visual の境界ボックスの四角形。

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

// Return the bounding rectangle of the parent visual object and all of its descendants.
Rect rectBounds = VisualTreeHelper.GetDescendantBounds(parentVisual);
' Return the bounding rectangle of the parent visual object and all of its descendants.
Dim rectBounds As Rect = VisualTreeHelper.GetDescendantBounds(parentVisual)

注釈

メソッドを GetDescendantBounds 呼び出して、ビジュアル オブジェクトのすべての子孫 (それ自体を含む) のすべてのコンテンツ 境界ボックスの和集合を Visual 返します。

こちらもご覧ください

適用対象