Searches a root element in the visual tree of WPF elements for the specified element.

Namespace: Elysium.Extensions
Assembly: Elysium (in Elysium.dll) Version: 2.0.976.4 (2.0.976.4)

Syntax

C#
public static DependencyObject FindTopLevelParent(
	DependencyObject reference
)
Visual Basic
Public Shared Function FindTopLevelParent ( 
	reference As DependencyObject
) As DependencyObject

Parameters

reference
Type: System.Windows..::..DependencyObject
An element, whose root element will be searched.

Return Value

Type: DependencyObject
Root element of the visual tree or null, if specified object is a root element.

See Also