VisualTreeAssistFindParentTParentType Method DW.WPFToolkit Documentation
Searches for a parent control by its type.

Namespace: DW.WPFToolkit.Helpers
Assembly: DW.WPFToolkit (in DW.WPFToolkit.dll) Version: 5.6.0.0
Syntax

C#
public static TParentType FindParent<TParentType>(
	DependencyObject item
)
where TParentType : DependencyObject

Parameters

item
Type: System.WindowsDependencyObject
The child control where the search is start from. If this its null the default(TParentType) will returned.

Type Parameters

TParentType
The type of the parent control to search for.

Return Value

Type: TParentType
The found parent control if any; otherwise default(TParentType). Its also default(TParentType) if the passed item is null.
See Also

Reference