title: Resize an image in a PictureBox to as large as it can go, while maintaining aspect ratio?
body: <p>I'm trying to make it so that an image in a PictureBox control will adjust its size automatically depending on the size of the window, but maintain the aspect ratio. So far just setting <code>SizeMode</code> to <code>StretchImage</code> causes the image to stretch to fit the entire PictureBox control. This ignores the aspect ratio, which isn't what I want.</p>
  
  <p>Is it possible to maintain the aspect ratio, but still stretch the image to the largest it can go dynamically as the form's size changes? Is it possible to do this <em>and</em> have it still be centered? I imagine I could recreate the image in memory each time the window is resized, but this seems like a bad idea.</p>