public static IEnumerable <DependencyObject> GetVisualChildren(this DependencyObject parent) { return(PresentationTreeUtils.GetVisualChildren(parent, false)); }
public static IEnumerable <T> GetVisualChildrenAndSelf <T>(this DependencyObject parent) where T : DependencyObject { return(PresentationTreeUtils.GetVisualChildren(parent, true).OfType <T>()); }