VisualTreeHelper.GetContentBounds メソッド
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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 ビジュアル。
戻り値
Visual3D の境界ボックスの 3D 四角形。
注釈
このメソッドを GetDescendantBounds 使用して、3D ビジュアル オブジェクトのすべての子孫 (それ自体を含む) のすべてのコンテンツ境界ボックスの和集合を Visual3D 返します。
こちらもご覧ください
適用対象
.NET Framework 4.8 およびその他のバージョン
製品 | バージョン |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |
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
パラメーター
戻り値
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 返します。
こちらもご覧ください
適用対象
.NET Framework 4.8 およびその他のバージョン
製品 | バージョン |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |