LogicalTreeHelper.GetParent(DependencyObject) Metoda

Definicja

Zwraca obiekt nadrzędny określonego obiektu, przetwarzając drzewo logiczne.

public:
 static System::Windows::DependencyObject ^ GetParent(System::Windows::DependencyObject ^ current);
public static System.Windows.DependencyObject GetParent (System.Windows.DependencyObject current);
static member GetParent : System.Windows.DependencyObject -> System.Windows.DependencyObject
Public Shared Function GetParent (current As DependencyObject) As DependencyObject

Parametry

current
DependencyObject

Obiekt do znalezienia obiektu nadrzędnego. Oczekuje się, że będzie to wartość a FrameworkElement lub FrameworkContentElement.

Zwraca

DependencyObject

Żądany obiekt nadrzędny.

Uwagi

Ta metoda jest tylko otoką, która pobiera odpowiednią wersję typu (FrameworkElement lub FrameworkContentElement) FrameworkElement.Parent właściwości lub FrameworkContentElement.Parent , więc chyba że nie możesz określić current typu, możesz zamiast tego sprawdzić odpowiednie właściwości wystąpienia.

Dotyczy