VisualTreeHelper.GetDescendantBounds 方法

定義

傳回視覺物件之所有下階的所有內容週框方塊聯集,這個聯集包括 Visual 的內容週框方塊。

多載

GetDescendantBounds(Visual3D)

傳回指定之 Visual3D 的所有子系的所有內容周框方塊聯集,包括 Visual3D 的內容周框方塊。

GetDescendantBounds(Visual)

傳回 Visual 的所有子系的所有內容周框方塊聯集,包括 Visual 的內容周框方塊。

GetDescendantBounds(Visual3D)

傳回指定之 Visual3D 的所有子系的所有內容周框方塊聯集,包括 Visual3D 的內容周框方塊。

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

參數

reference
Visual3D

要計算其所有子系之周框方塊值的 3D 視覺物件。

傳回

傳回 3D 視覺物件的周框方塊 3D 矩形。

備註

GetContentBounds呼叫 方法,以傳回 3D 視覺物件的快取周框方塊矩形。

適用於

GetDescendantBounds(Visual)

傳回 Visual 的所有子系的所有內容周框方塊聯集,包括 Visual 的內容周框方塊。

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

參數

reference
Visual

要計算其所有子系之周框方塊值的 Visual

傳回

指定之 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)

備註

GetContentBounds呼叫 方法來傳回 的 Visual 快取周框方塊矩形。

適用於