Searches a parent of the specified object in the logical tree of WPF elements.

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

Syntax

C#
public static T FindParent<T>(
	DependencyObject reference
)
where T : DependencyObject
Visual Basic
Public Shared Function FindParent(Of T As DependencyObject) ( 
	reference As DependencyObject
) As T

Parameters

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

Type Parameters

T
A parent type.

Return Value

Type: T
The parent or null, if there are no object of specified type.

See Also