title: WinForms: Show new form in the same window
body: <p>I'm an experienced MVC developer making my first attempt at an internal WinForms production app for the company I work for.</p>
  
  <p>When my app first loads it loads a LoginForm (which inherits from BaseForm to set things like window size, NotifyIcon properties, etc). On successful login, I want to retain the same window, but replace the content with a new screen. This seems pretty basic but even after searching for how to do this, none of it works like I would expect it to.</p>
  
  <p>I've tried code like this:</p>
  
  <pre><code>private void Button_Click(object sender, RoutedEventArgs e)
  {
      Window1 W1 = new Window1();
      W1.Show();
      this.Close();    
  }
  </code></pre>
  
  <p>But of course, that opens a new window and closes the current one, which isn't what I want. I want to retain the same parent window and just replace the content. </p>
  
  <p>I have two questions (they're sort of related):</p>
  
  <p>1) How do I simply replace parent window content with a new Form instead of opening it in a new window? Right now my forms are in separate WinForms controls (LoginForm and ChatForm). Do I need to architect my project differently in order to accomplish this?</p>
  
  <p>2) The ChatForm contains a SplitContainer with buttons on the left (see screenshot below). On clicking each button, the content of the right hand pane should change. Would these be best represented by UserControls (one for the ChatQueue, one for a ChatWindow, passing in parameters to let it know which person we're chatting with)?</p>
  
  <p>Just trying to get my head around basic WinForms project architecture and navigation between different content screens.</p>
  
  <p><img src="https://i.stack.imgur.com/QSe8Z.jpg" alt="enter image description here"></p>