I created a webform with a regular xtraeditors.pictureedit on it. I allowed the user to choose a alignment and sizemode for this pictureedit. I saved these two properties in the database along with the picture itself. I then wanted to display this picture on a report with the properties showing. However, when I added a XRPictureBox to my report - I noticed that the XRPictureBox does not have an alignment property, and its Sizing feature does not contain all of the values that the PictureEdit does for its SizeMode property.
I tried just adding a regular PictureEdit to the report so that I could retain all of the correct properties and their values, but this of course was not aloud. Am I missing something here that would allow me to align the picture inside a picturebox on my report?
There are multiple pictures on the report by the way - all of them have their data saved in the database, including: width, height, image, name, sizemode, and alignment. It is very preferable to keep the alignment and sizemode fields.
Thank you.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Scott,
Please note that you can specify how to display an image in the XRPictureBox control via the Sizing property. Please refer to the XRPictureBox.Sizing Property documentation topic and feel free to ask for clarification if necessary.
Thanks
Sergi
There are two main properties that I am trying to reproduce on the report that I can produce on a winform: Here are the properties and their differences:
1.) SizeMode
XtraEditors.PictureEdit has a property of SizeMode that can make the picture: Clip, Stretch, Zoom, StetchHorizontal, StetchVertical, Squeeze.
XtraReports.UI.XRPictureBox has a property of Sizing that can make the picture: Normal, StretchImage, AutoSize, CenterImage, ZoomImage
As you can see - The XRPictureBox has a Sizing property, but lacks the same types as the PictureEdit.
2.) PictureAlignment
XtraEditors.PictureEdit has this feature.
XtraReports.UI.XRPictureBox does not have this feature to align a picture inside the box.
-----------------------------------------------------------------------------
For example:
I need a picturebox on a report with a picture that is BottomRight Aligned and is StretchVertical sized. With the XRPictureBox, this looks impossible to reproduce, but on a winform's PictureEdit it can easily be accomplished.
Thank you.
Hi Scott,
You can use the WinControlContainer control to add the PictureEdit control on to the report. Attached is a project, illustrating the suggested approach. Please review it.
Thanks,
Elliot
I tried your example and everything seemed to work perfect at first. Then I noticed a little clipping on the right side of the image, so I did a little investigating and it turned out that if I added a pictureEdit that is 750 width into an XRPanel that is 750 width - the pictureEdit gets clipped.
It is as if the xtraReport controls use a different height and width scale than the regular winforms controls. I attached the sample project showing this. Is there a way to fix this?
Hi Scott,
Please accept my sincere apologies for the delay in responding.
Please set the correct size to the winControlContainer1 to avoid this problem. Please review that attached picture for additional information. Hope this helps.
Thanks,
Elliot
This helped a lot - Thank you very much!
Also I had this property in there:
wcc.SyncBounds = false;
That messed things up also, so I had to take that out.
Totally Fixed!
Hi Scott,
Thank you for your feedback.
I am glad to hear that you have resolved this problem. Please contact us if you experience any further difficulties.
Thanks,
Elliot