VisualTreeHelper.GetDescendantBounds Metoda

Definicja

Zwraca związek wszystkich pól ograniczenia zawartości dla wszystkich obiektów podrzędnych obiektu wizualizacji, który zawiera pole ograniczenia zawartości obiektu Visual.

Przeciążenia

GetDescendantBounds(Visual3D)

Zwraca połączenie wszystkich pól ograniczenia zawartości dla wszystkich elementów podrzędnych określonego Visual3Dobiektu , który zawiera pole ograniczenia zawartości obiektu Visual3D.

GetDescendantBounds(Visual)

Zwraca połączenie wszystkich pól ograniczenia zawartości dla wszystkich elementów podrzędnych Visualobiektu , który zawiera pole ograniczenia zawartości obiektu Visual.

GetDescendantBounds(Visual3D)

Zwraca połączenie wszystkich pól ograniczenia zawartości dla wszystkich elementów podrzędnych określonego Visual3Dobiektu , który zawiera pole ograniczenia zawartości obiektu 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 podrzędnych 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 połączenie wszystkich pól ograniczenia zawartości dla wszystkich elementów podrzędnych Visualobiektu , który zawiera pole ograniczenia zawartości obiektu 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

Obliczono Visual wartość pola ograniczenia dla wszystkich elementów podrzędnych.

Zwraca

Prostokąt pola ograniczenia dla określonego Visualelementu .

Przykłady

W poniższym przykładzie pokazano, jak pobrać połączenie prostokątów związanych z elementami podrzędnymi 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ć buforowany prostokąt pola ograniczenia dla elementu Visual.

Dotyczy