How to resize a PictureBox while maintaining its Aspect Ratio
.net, c#, winforms
Solution
Change `SizeMode = Zoom` on the `PictureBox`. That will keep the aspect ratio for your image.
The only side-effect you may not want is that it will also make the image larger than the original, if you increase the size of the form enough, resulting in a fuzzy looking image.
Problem
I have a Windows Forms application where I let the user resize a PictureBox. But it's pretty useless because it does not maintain its aspect ratio as the user makes it smaller or larger. How can I do this? I know how to resize a picturebox normally with mouseDown, mouseMove and mouseUp events, but how to make sure it keeps its aspect ratio?