title: Set vertical dock priority over horizontal with DockPanel Suite
body: <p>I'm using <a href="http://dockpanelsuite.com/" rel="nofollow noreferrer">DockPanel Suite</a> but I've run into an issue due to the relatively sparse documentation.</p>
  
  <p>I have two docked panels: one which docks left and right, called "Side", and one which docks on the bottom, called "Bottom". I would like Side to fill the height of the form, with Bottom filling up the rest.</p>
  
  <p>So what I'm aiming for is this:
  <img src="https://i.imgur.com/Rw0cb0N.png" alt="Side dock fill"></p>
  
  <p>But what I have instead is this:
  <img src="https://i.imgur.com/QGXbbZ6.png" alt="Bottom dock fill"></p>
  
  <p>When I run the program, I get the second variant, and if I drag Bottom out to float it, then drag it back, it will dock the way I want it to, but I can't achieve this programmatically.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>public Form1()
  {
      InitializeComponent();
  
      SideForm side = new SideForm();
      side.Show(dockPanel, DockState.DockRight);
  
      BottomForm bottom = new BottomForm();
      bottom.Show(dockPanel, DockState.DockBottom);
  }
  </code></pre>
  
  <p>I've tried changing the order, but that has no effect. I've tried poking around the various properties and methods, but there's not much documentation, so IntelliSense is not much help here.</p>
  
  <h2>Update</h2>
  
  <p>I've tried bringing the side panel to front and/or sending the bottom panel to back as two people have suggested, but that had no effect. Here's the full code for that:</p>
  
  <pre><code>public Form1()
  {
      InitializeComponent();
  
      SideForm side = new SideForm();
      side.Show(dockPanel, DockState.DockRight);
  
      BottomForm bottom = new BottomForm();
      bottom.Show(dockPanel, DockState.DockBottom);
  
      // I've tried enabling these one at a time, and even both at once, no effect
      side.BringToFront();
      bottom.SendToBack();
  }
  </code></pre>
  
  <p>User Lex Li made another suggestion about first creating a document then docking to the bottom of that. That seemed to work, except now there is no in the bottom window, as follows:</p>
  
  <p><img src="https://i.imgur.com/r8cPRXy.png" alt="No titlebar"></p>
  
  <p>Here is the code I used to create this:</p>
  
  <pre><code>doc = new Document();
  doc.Show(dockPanel, DockState.Document);
  
  side = new SideForm();
  side.Show(dockPanel, DockState.DockRight);
  
  bottom = new BottomForm();
  bottom.Show(doc.Pane, DockAlignment.Bottom, 0.3);
  </code></pre>
  
  <p>I can avoid this by setting the main dockpanel's <code>DocumentStyle</code> property to <code>DockingMdi</code> or <code>DockingWindow</code>, which gives me this:</p>
  
  <p><img src="https://i.imgur.com/8TG5494.png" alt="Tabs"></p>
  
  <p>But then those tabs are there, which I don't want; I prefer to use <code>DockingSdi</code> style.</p>
  
  <p>So, I'm trying to <em>programatically</em> achieve docking to the very bottom, like this:
  Showing the location of the dock...
  <img src="https://i.imgur.com/kAVsyFq.png" alt="Starting to dock"></p>
  
  <p>And finally, the docked window
  <img src="https://i.imgur.com/y9Ua2jh.png" alt="Docked"></p>