Returns all the parents in the visual tree

Namespace:  C1.Xaml
Assembly:  C1.Xaml (in C1.Xaml.dll)

Syntax

C#
public static IList<FrameworkElement> GetAllParents(
	this FrameworkElement elem
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function GetAllParents ( _
	elem As FrameworkElement _
) As IList(Of FrameworkElement)

Parameters

elem
Type: FrameworkElement

Return Value

The list of ancestor framework elements in the visual tree hierarchy

See Also