title: How to make scrollbars appear in a resizable panel when the contained control is too big for it?
body: <p>I am developing a Windows Forms application (.NET 2.0, VS 2005). I have a form that essentially contains a panel that is dynamically resized with the form :</p>
  
  <pre><code>this.panel1.Dock=DockStyle.Fill;
  </code></pre>
  
  <p>This panel is simply used as a container. At runtime, a custom control will be added :</p>
  
  <pre><code>UserControl uc=new UserControl();
  panel1.Controls.Add(uc);
  uc.Dock=DockStyle.Fill;
  </code></pre>
  
  <p>As this custom control has a minimum size requirement, I want scroll bars to appear on the containing panel if it gets too small to show the entire control :</p>
  
  <pre><code>this.panel1.AutoScroll=true;
  </code></pre>
  
  <p>This does not work. I have tried to resize the panel using the Anchor property rather than the Dock property, to no avail.</p>