TreeHelper.

GetParentObject(DependencyObject) Method

Summary

This method is an alternative to WPF's VisualTreeHelper.GetParent method, which also supports content elements. Keep in mind that for content element, this method falls back to the logical tree of the element!
Namespace
MahApps.Metro.Controls
Containing Type
TreeHelper

Syntax

public static DependencyObject GetParentObject(this DependencyObject child)

Parameters

Name Type Description
child DependencyObject The item to be processed.

Return Value

Type Description
DependencyObject The submitted item's parent, if available. Otherwise null.