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

How to scaleproportional picture but not enlarge small-size picture?

1 Answer 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 28 May 2015, 10:20 AM

I am doing a report that using PictureBox to get pictures from database.

I set the property Sizing to ScaleProportional, however some small-size picture will be enlarged to fit the container size.

Since the picture is in binary format and the pictures size are different, I can't set the exact size for the PictureBox container.

How can I keep the original size for those small-size pictures, and fit those large pictures to the container size with proportional?

Thanks

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 29 May 2015, 08:34 AM
Hello Vincent,

The desired behavior stands somewhere between the Sizing = Center and Sizing = ScaleProportional behaviors, as explained in the PictureBox help article's sizing property modes section.
Unfortunately, such mode is not available, so you will need to change the mode dynamically via binding, based on the image which is displayed in the item.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Vincent
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or