示例#1
0
        public static async Task <T> FindFirstVisualChildOfType <T>(DependencyObject o) where T : DependencyObject
        {
            var type = o as T;

            return(type ??
                   await UIThreadHelper.Instance.InvokeAsync(() => VisualTreeExtensions.FindFirstVisualChildOfType <T>(o)));
        }
示例#2
0
 public static T FindFirstVisualChildOfType <T>(DependencyObject o) where T : DependencyObject
 {
     if (o is T)
     {
         return(o as T);
     }
     return(UIThreadHelper.Instance.Invoke(() => {
         return VisualTreeExtensions.FindFirstVisualChildOfType <T>(o);
     }));
 }
示例#3
0
 public static Task <T> FindNextVisualSiblingOfType <T>(DependencyObject o) where T : DependencyObject
 => UIThreadHelper.Instance.InvokeAsync(() => VisualTreeExtensions.FindNextVisualSiblingOfType <T>(o));
示例#4
0
 public static T FindNextVisualSiblingOfType <T>(DependencyObject o) where T : DependencyObject
 {
     return(UIThreadHelper.Instance.Invoke(() => {
         return VisualTreeExtensions.FindNextVisualSiblingOfType <T>(o);
     }));
 }