title: Current Window Content cannot be identified anymore
body: <p>I have programmed code on top of the MainWindow content.
  As I added a login-mask to start before the MainWindow my programmed content distribution does not work properly anymore.</p>
  
  <p>The code when the MainWindow is called and the login-mask is closed:</p>
  
  <p><strong>Login-Mask Window Code (after successful login)</strong></p>
  
  <pre><code>MainWindow popup = new MainWindow();
  popup.Show();
  this.Close();
  </code></pre>
  
  <p>Within the MainWindow I am calling my content like this which still works when the MainWindow was called:</p>
  
  <p><strong>MainWindow Content Code</strong></p>
  
  <pre><code>this.contentControl.Content = new UserControlXYZ();
  </code></pre>
  
  <p>Now when I call another UserControl from the new loaded contentControl.Content I get a NullPointerException (Before adding the login-mask it was loaded):</p>
  
  <p><strong>UserControlXYZ Content Code</strong></p>
  
  <pre><code> (Application.Current.MainWindow.FindName("contentControl") as ContentControl).Content = new UserControlNEWControl();
  </code></pre>