Exemplo n.º 1
0
 public static T FirstChild <T>(this DependencyObject parent) where T : DependencyObject => (T)parent.AllChildren().FirstOrDefault();
Exemplo n.º 2
0
 public static T FirstChild <T>(this DependencyObject parent) where T : DependencyObject
 {
     return(parent.AllChildren().OfType <T>().FirstOrDefault());
 }
Exemplo n.º 3
0
 public static T FirstChild <T>(this DependencyObject parent) where T : DependencyObject
 {
     return(parent.AllChildren().Where(e => e is T).FirstOrDefault() as T);
 }