VisualTreeAssistGetParentsUntilTParentType, TEndType Method DW.WPFToolkit Documentation
Gets all parent controls with the specific type as long no control with the second control type is found.

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

C#
public static List<TParentType> GetParentsUntil<TParentType, TEndType>(
	DependencyObject item
)
where TParentType : DependencyObject
where TEndType : DependencyObject

Parameters

item
Type: System.WindowsDependencyObject
The child control where the search is start from. If this is null the returned list is empty.

Type Parameters

TParentType
The type of the parent controls to search for.
TEndType
The type of the parent control when to stop searching.

Return Value

Type: ListTParentType
A list of found parent controls. This is empty if no control has been found.
See Also

Reference