claws
claws

Reputation: 54100

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

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?

Upvotes: 6

Views: 9046

Answers (2)

Alex Reitbort
Alex Reitbort

Reputation: 13696

Look at the SizeMode property

Upvotes: 0

Darin Dimitrov
Darin Dimitrov

Reputation: 1038720

You could set the PictureBox.SizeMode property to StretchImage.

Upvotes: 13

Related Questions