Returns all the parents in the visual tree

Namespace:  C1.Silverlight
Assembly:  C1.Silverlight (in C1.Silverlight.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: System.Windows..::..FrameworkElement

Return Value

The list of ancestor framework elements in the visual tree hierarchy

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FrameworkElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also