title: WPF usercontrol showdialog problem
body: <p>There is a MainWindow, a usercontrol which is located in my MainWindow and a OtherForm which I am going to show from usercontrol. I sent OtherForm as parameter from MainWindow to usercontrol. And in usercontrol I am calling <code>OtherForm.showdialog</code>. When I show it the second time, I am getting "Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed" problem.</p>
  
  <p><strong>Code</strong></p>
  
  <p>In MainWindow class</p>
  
  <pre><code>void Example()
  {
     usercontrol.Load(new Otherform{ variable= 1 });
  }
  </code></pre>
  
  <p>In Usercontrol class</p>
  
  <pre><code>private Window _form;
  public void Load(window form)
  {
      _form=form;
  }
  
  void ExampleInUSerControl
  {
     _form.VerifyAccess();
     _form.Activate();
     _form.ShowActivated = true;
     _form.ShowDialog();
  }
  </code></pre>