title: Windows Forms Side panel with Split Horizontal Panels Layout
body: <p>So I have been trying to make this layout. So far I have been able to do the 1st panel using the <em>DockStyle.Left</em>. However when I try to add the 2nd it keeps overlapping the 1st one. Also what would be the best way to add/manage the panels so when I add the 3rd one both panels get half of the UI height.</p>
  
  <p><a href="https://i.stack.imgur.com/s1L2F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s1L2F.png" alt="enter image description here"></a></p>
  
  <p>I'd like to avoid to use Drop and Drag tool.</p>
  
  <p>Code with my panels so far:</p>
  
  <pre><code>Panel backPanel = new Panel();
  backPanel.Dock = DockStyle.Fill;
  
  Panel panel1 = new Panel();
  panel1.Dock = DockStyle.Left;
  panel1.BackColor = Color.Red;
  
  Panel panel2 = new Panel();
  panel2.Dock = DockStyle.Top;
  panel2.BackColor = Color.Cyan;
  
  backPanel.Controls.Add(panel1);
  backPanel.Controls.Add(panel2);
  this.Controls.Add(backPanel);
  </code></pre>