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:
Is that you search ?
if (this.m_myWindow != null) { if (this.m_myWindow.IsActive) return; } this.m_myWindow = new MyWindow(); this.m_myWindow.Show();
If you want a singleton, you should read this : How can we create a Singleton Instance for a Window?