VisualTreeHelper.GetDescendantBounds Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the union of all the content bounding boxes for all the descendants of the visual object, which includes the content bounding box of the Visual.
Overloads
GetDescendantBounds(Visual3D) |
Returns the union of all the content bounding boxes for all the descendants of the specified Visual3D, which includes the content bounding box of the Visual3D. |
GetDescendantBounds(Visual) |
Returns the union of all the content bounding boxes for all the descendants of the Visual, which includes the content bounding box of the Visual. |
GetDescendantBounds(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
Parameters
- reference
- Visual3D
The 3D visual whose bounding box value for all descendants is computed.
Returns
Returns the bounding box 3D rectangle for the 3D visual.
Remarks
Call the GetContentBounds method to return the cached bounding box rectangle for a 3D visual object.
Applies to
GetDescendantBounds(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
Parameters
Returns
The bounding box rectangle for the specified Visual.
Examples
The following example shows how to retrieve the union of bounding rectangles for the descendants of a 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)
Remarks
Call the GetContentBounds method to return the cached bounding box rectangle for a Visual.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기