VisualTreeAssistFindNamedParentTParentType Method (DependencyObject, String)DW.WPFToolkit Documentation
Searches for a parent control by its type and name.

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

C#
public static TParentType FindNamedParent<TParentType>(
	DependencyObject item,
	string name
)
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.
name
Type: SystemString
The name of the parent control to search for. If this its null, empty or just whitespaces this method returns null.

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 or the name is null, empty or just whitespaces.
See Also

Reference