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))); }
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); })); }
public static Task <T> FindNextVisualSiblingOfType <T>(DependencyObject o) where T : DependencyObject => UIThreadHelper.Instance.InvokeAsync(() => VisualTreeExtensions.FindNextVisualSiblingOfType <T>(o));
public static T FindNextVisualSiblingOfType <T>(DependencyObject o) where T : DependencyObject { return(UIThreadHelper.Instance.Invoke(() => { return VisualTreeExtensions.FindNextVisualSiblingOfType <T>(o); })); }