'Declaration Public Overloads Shared Function GetParent( _ ByVal child As DependencyObject, _ ByVal includeLogicalParent As Boolean _ ) As DependencyObject
public static DependencyObject GetParent( DependencyObject child, bool includeLogicalParent )
Note: if the child derives from System.Windows.Media.Visual or System.Windows.Media.Media3D.Visual3D this method returns its visual parent. If the visual parent is null and includeLogicalParent parameter is true then it returns the logical parent of the child if any. If the child is derived from System.Windows.FrameworkContentElement this method returns its logical parent unless includeLogicalParent parameter is false.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2