title: How do I know if a WPF window is opened
body: <p>In a WPF window, how do I know if it is opened?</p>
  
  <p>My goal to open only 1 instance of the window at the time.</p>
  
  <p>So, my pseudo code in the parent window is:</p>
  
  <pre><code>if (this.m_myWindow != null)
  {
      if (this.m_myWindow.ISOPENED) return;
  }
  
  this.m_myWindow = new MyWindow();
  this.m_myWindow.Show();
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I found a solution that solves my initial problem.
  window.ShowDialog();</p>
  
  <p>It blocks the user from opening any other window, just like a modal popup.
  Using this command, it is not necessary to check if the window is already open.</p>