Język

VisualTreeHelper.GetDescendantBounds Metoda

Definicja

Zwraca związek wszystkich pól ograniczenia zawartości dla wszystkich elementów potomnych obiektu wizualizacji, który zawiera pole ograniczenia zawartości obiektu Visual.

Przeciążenia

Nazwa Opis
GetDescendantBounds(Visual3D)

Zwraca unię wszystkich pól ograniczenia zawartości dla wszystkich elementów potomnych określonego Visual3Delementu , który zawiera pole ograniczenia zawartości elementu Visual3D.

GetDescendantBounds(Visual)

Zwraca związek wszystkich pól ograniczenia zawartości dla wszystkich elementów potomnych Visualobiektu , który zawiera pole ograniczenia zawartości elementu Visual.

GetDescendantBounds(Visual3D)

Zwraca unię wszystkich pól ograniczenia zawartości dla wszystkich elementów potomnych określonego Visual3Delementu , który zawiera pole ograniczenia zawartości elementu 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

Parametry

reference
Visual3D

Wizualizacja 3D, której wartość pola ograniczenia dla wszystkich elementów potomnych jest obliczana.

Zwraca

Zwraca prostokąt 3D pola ograniczenia dla wizualizacji 3D.

Uwagi

Wywołaj metodę GetContentBounds , aby zwrócić buforowany prostokąt pola ograniczenia dla obiektu wizualizacji 3D.

Dotyczy

GetDescendantBounds(Visual)

Zwraca związek wszystkich pól ograniczenia zawartości dla wszystkich elementów potomnych Visualobiektu , który zawiera pole ograniczenia zawartości elementu 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

Parametry

reference
Visual

Obliczana Visual jest wartość pola ograniczenia dla wszystkich elementów potomnych.

Zwraca

Prostokąt pola ograniczenia dla określonego Visualelementu .

Przykłady

W poniższym przykładzie pokazano, jak pobrać połączenie prostokątów ograniczenia elementów podrzędnych obiektu 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)

Uwagi

Wywołaj metodę GetContentBounds , aby zwrócić prostokąt pola ograniczenia buforowanego dla elementu Visual.

Dotyczy