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 メソッドを使用して、Visual3D自体を含む 3D ビジュアル オブジェクトのすべての子孫のすべてのコンテンツ 境界ボックスの和集合を返します。
こちらもご覧ください
適用対象
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自体を含むビジュアル オブジェクトのすべての子孫のすべてのコンテンツ境界ボックスの和集合を返します。