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

PictureBox with autosize and maxwidth

1 Answer 343 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Morten Louw
Top achievements
Rank 1
Morten Louw asked on 27 Feb 2012, 10:08 PM
Hi all,

My scenario is to place a picture, uploaded by a user.
The picture can be any size, so, I want it to show as much of it as possible.

I have tried different sizetypes, and autosize seems to work the best for me.

The problem - which is a big issue - is, when the picture is wider than the page size. It makes the document contain blank pages on every other page, except the page with the right part of the picture.
This behavior is natural...

What I wanted the most, is some kind of maxsize along with the autosize setting.
Or is there an other recommandation.

Kind regards,
Morten

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 29 Feb 2012, 12:38 PM
Hello Morten,

There is no MaxSize property of the picturebox, as it is not meant for covering cases like yours. The only reasonable solution would be to Bind the PictureBox to a User Function and make calculations inside the function, then resize the picture if needed. 

Kind regards,
Elian
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
Morten Louw
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or