VisualTreeHelper.GetContentBounds Metoda

Definicja

Zwraca prostokąt buforowanego pola ograniczenia dla .Visual

Przeciążenia

GetContentBounds(Visual3D)

Zwraca prostokąt buforowanego pola ograniczenia dla określonego Visual3Delementu .

GetContentBounds(Visual)

Zwraca prostokąt buforowanego pola ograniczenia dla określonego Visualelementu .

GetContentBounds(Visual3D)

Zwraca prostokąt buforowanego pola ograniczenia dla określonego Visual3Delementu .

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

Parametry

reference
Visual3D

Wizualizacja 3D, której wartość pola ograniczenia jest obliczana.

Zwraca

Rect3D

Prostokąt 3D pola ograniczenia dla .Visual3D

Uwagi

GetDescendantBounds Użyj metody , aby zwrócić połączenie wszystkich pól ograniczenia zawartości dla wszystkich elementów podrzędnych obiektu wizualizacji 3D, który zawiera Visual3D sam obiekt.

Zobacz też

Dotyczy

GetContentBounds(Visual)

Zwraca prostokąt buforowanego pola ograniczenia dla określonego Visualelementu .

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

Parametry

reference
Visual

Wartość Visual pola ograniczenia jest obliczana.

Zwraca

Rect

Prostokąt pola ograniczenia dla .Visual

Przykłady

W poniższym przykładzie pokazano, jak pobrać prostokąt Visual ograniczenia obiektu.

// 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)

Uwagi

Wywołaj metodę GetDescendantBounds , aby zwrócić związek wszystkich pól ograniczenia zawartości dla wszystkich elementów podrzędnych obiektu wizualizacji, który zawiera Visual sam obiekt.

Zobacz też

Dotyczy