Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why isn't PictureBox.Image autoscaling to fit in?

Tags:

c#

.net

winforms

I've an interface where user selects picture (using OpenFileDialog) and its shown in a fixed size picturebox. I want this picture to fit in the picturebox even if the resolution is high.

What property do I need to set inorder to let my image AutoScaleToFitIn the PicutreBox?

like image 605
claws Avatar asked Nov 16 '09 13:11

claws


1 Answers

You could set the PictureBox.SizeMode property to StretchImage.

like image 158
Darin Dimitrov Avatar answered Nov 15 '22 18:11

Darin Dimitrov