Beispiel #1
0
 /// <summary>
 /// Returns true if the specified element is a child of parent somewhere in the visual
 /// tree. This method will work for Visual, FrameworkElement and FrameworkContentElement.
 /// </summary>
 /// <param name="element">The element that is potentially a child of the specified parent.</param>
 /// <param name="parent">The element that is potentially a parent of the specified element.</param>
 public static bool IsDescendantOf(DependencyObject element, DependencyObject parent)
 {
     return(TreeHelper.IsDescendantOf(element, parent, true));
 }