Click or drag to resize
ParentOfTypeExtensionsIsAncestorOf Method
Determines whether the element is an ancestor of the descendant.

Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls (in Telerik.Windows.Controls.dll) Version: 2017.3.1018.40 (2017.3.1018.40)
Syntax
public static bool IsAncestorOf(
	this DependencyObject element,
	DependencyObject descendant
)

Parameters

element
Type: System.WindowsDependencyObject
descendant
Type: System.WindowsDependencyObject

Return Value

Type: Boolean
true if the visual object is an ancestor of descendant; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DependencyObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also