In a WPF window, how do I know if it is opened?
My goal to open only 1 instance of the window at the time.
So, my pseudo code in the parent window is:
If you need to activate the window if it is found, you can use the code below:
//activate a window found //T = Window Window wnd = Application.Current.Windows.OfType().Where(w => w.Name.Equals(nome)).FirstOrDefault(); wnd.Activate();