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

경계 상자 값이 계산되는 3차원 표시입니다.

반환

Rect3D

Visual3D에 대한 경계 상자 3차원 사각형입니다.

설명

이 메서드를 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 반환합니다.

추가 정보

적용 대상