ExtensionMethods.IsLogicalAncestorOf Method

Definition

Determines if an element is an ancestor of another element using both the logical and visual trees.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsLogicalAncestorOf(System::Windows::DependencyObject ^ element, System::Windows::DependencyObject ^ other);
public static bool IsLogicalAncestorOf (this System.Windows.DependencyObject element, System.Windows.DependencyObject other);
static member IsLogicalAncestorOf : System.Windows.DependencyObject * System.Windows.DependencyObject -> bool
<Extension()>
Public Function IsLogicalAncestorOf (element As DependencyObject, other As DependencyObject) As Boolean

Parameters

element
DependencyObject

The ancestor element.

other
DependencyObject

The descendent element.

Returns

True if element is an ancestor of other, otherwise false.

Applies to