public static bool TryFind(WindowProperties prop) { Window w = new Window(prop); return w.Exists; }
public static bool TryFind(WindowProperties prop, out Window window) { window = new Window(prop); if (window.Exists) return true; window = null; return false; }
public static bool TryFind(WindowProperties prop, out Window window) { try { window = new Window(prop); return true; } catch (WindowNotFoundException) { window = null; return false; } }