title: Calling up DockPanel-Suite's "AutoHidden" DockContent programmatically
body: <p>I am having trouble causing an 'autohide' dock to appear programmatically.</p>
  
  <p>Couldn't find any answer around the net, though the following <a href="https://stackoverflow.com/questions/12956147/dockpanel-suite-dockcontent-visibility">SO Question</a> suggested that <code>.Show()</code> should have done the trick</p>
  
  <p>I've tried this on the latest <a href="https://nuget.org/packages/DockPanelSuite" rel="nofollow noreferrer">NuGet version</a> of the code.</p>
  
  <p>My test code is below.</p>
  
  <p>Anyone know how to do it? or what I'm doing wrong?</p>
  
  <p><strong>Update:</strong> apparently this is a bug in 2.7.0, I've opened an <a href="https://github.com/dockpanelsuite/dockpanelsuite/issues/80" rel="nofollow noreferrer">issue</a> for it with the project.
  @roken's answer is an excellent workaround, so I've updated the code below to reflect it.</p>
  
  <hr>
  
  <h2>My test Code</h2>
  
  <p>Create a simple Visual Studio Windows Form application, and replace the main form's source file content with this code:</p>
  
  <pre><code>using System;
  using System.Windows.Forms;
  using dps = WeifenLuo.WinFormsUI.Docking;
  
  namespace testDockPanel
  {
      public partial class Form1 : Form
      {
          private dps.DockPanel dockPanel;
          private dps.DockContent dc;
          private Control innerCtrl;
  
          public Form1()
          {
              InitializeComponent();
  
              dockPanel = new dps.DockPanel();
              dockPanel.Dock = DockStyle.Fill;
              dockPanel.DocumentStyle = dps.DocumentStyle.DockingWindow;
  
              toolStripContainer1.ContentPanel.Controls.Add(dockPanel);
  
              dc = new dps.DockContent();
              dc.DockPanel = dockPanel;
              dc.DockState = dps.DockState.DockRightAutoHide;
              innerCtrl = new WebBrowser() { Dock = DockStyle.Fill };
              dc.Controls.Add( innerCtrl );
  </code></pre>
  
  <p>This is the part of the code that didn't work:</p>
  
  <pre><code>            // This SHOULD show the autohide-dock, but NOTHING happens.
              dc.Show();
  </code></pre>
  
  <p>I've replaced it with @roken's suggestion and it now works:</p>
  
  <pre><code>            dockPanel.ActiveAutoHideContent = dc;
              innerCtrl.Focus(); // This is required otherwise it will autohide quickly.
  
          }
      }
  }
  </code></pre>