title: .NET UserControl: Size property gives incorrect value on Resize event
body: <p>Excuse the code dump, these are functions within a UserControl</p>
  
  <pre><code>private void PNGQuantPreviewControl_Resize(object sender, EventArgs e)
  {
      createOffScreenBm();
      draw();           
  } 
  private void createOffScreenBm()
  {
      offScreenBm = new Bitmap(this.Size.Width, this.Size.Height);
      offScreenGfx = Graphics.FromImage(offScreenBm);
  }
  private void draw()
  {
      // draw background
      offScreenGfx.FillRectangle(transTexture, 0, 0, offScreenBm.Width, offScreenBm.Height);
      // draw image preview
      offScreenGfx.DrawImage(pngQuantPreview, getTopLeftPosition());
      // apply to picture box
      this.CreateGraphics().DrawImage(offScreenBm, 0, 0);
  }
  </code></pre>
  
  <p>So, when the control changes size, it recreates the offscreen bitmap to reflect the new size and redraws the image.</p>
  
  <p>However, if I quickly resize the control the bitmap doesn't fill it, there's a gap left at the right and/or bottom.</p>
  
  <p>I'm fairly new to C#, so there's probably something obvious I'm doing wrong, or I'm reading the size values at the wrong time. Any ideas?</p>