This is a migrated thread and some comments may be shown as answers.

picturebox scaling: position of the image

1 Answer 387 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joffrey
Top achievements
Rank 2
Joffrey asked on 26 Aug 2008, 12:23 PM
Hi

I want to scale a picturebox, so that you give it a width and the height of the
image is automatically determined. And also very important, that the image is attached to the top of the picturebox.
Does anybody know how to do that?

My experience is that if I use ScaleProportional with width:3cm and height:5cm
the image is scaled corectly but attached to the middle of the picturebox. And that looks in my case just stupid.

Regards
Joffrey

1 Answer, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 26 Aug 2008, 02:22 PM
Hi Joffrey,

If you want to have the image placed in the upper-left corner of the picturebox item, you should set the Sizing property to Normal. However in this case, the image is clipped if it's larger than the picturebox item which contains it and would not be automatically sized as the AutoSize option of the Sizing property would do.

Best wishes,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Joffrey
Top achievements
Rank 2
Answers by
Steve
Telerik team
Share this question
or