title: How to Programmatically Scroll a Panel
body: <p>I have a <code>System.Windows.Forms.Panel</code> with some content.</p>
  
  <p>I am trying to programmatically scroll the panel (vertically) either up or down.</p>
  
  <p>I have tried setting the <code>AutoScrollPosition</code> property to a new <code>Point</code> on the panel but that doesn't seem to do it.</p>
  
  <p>I have the <code>AutoScroll</code> property set to true.</p>
  
  <p>I even tried to set the <code>VerticalScroll.Value</code> twice as suggested <a href="https://stackoverflow.com/questions/15559914/horizontalscroll-value-wont-programmatically-set">here</a>, but that doesn't seem to work either.</p>
  
  <p>This is what I am currently doing:</p>
  
  <pre><code>//I have tried passing both positive and negative values.
  panel.AutoScrollPosition = new Point(5, 10);
  </code></pre>
  
  <p>The X and Y values on AutoScrollPosition remain 0 and 0.</p>
  
  <p>Any help or direction on this would be greatly appreciated it.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Marwan</p>