Telerik UI for Windows Phone by Progress

Finds the last visual ancestor of the provided type.

Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Core (in Telerik.Windows.Core.dll) Version: 2013.1.422.2040 (2013.1.0422.2040)


public static T FindLastVisualAncestor<T>(
	DependencyObject child,
	Predicate<DependencyObject> condition = null
where T : class
Visual Basic
Public Shared Function FindLastVisualAncestor(Of T As Class) ( _
	child As DependencyObject, _
	Optional condition As Predicate(Of DependencyObject) = Nothing _
) As T
Visual C++
generic<typename T>
where T : ref class
static T FindLastVisualAncestor(
	DependencyObject^ child, 
	Predicate<DependencyObject^>^ condition = nullptr


Type: System.Windows..::..DependencyObject
The from which to start the search.
condition (Optional)
Type: System..::..Predicate<(Of <(<'DependencyObject>)>)>
A condition to test each ancestor of the T type.

Type Parameters

The type of the ancestor to search for.

Return Value

The last ancestor of the specified T type which matches the condition.

See Also