Search code examples
c#winformsdevexpressxtrareport

XtrReports, xrPictureBox how to align Image to right ? Winform Devexpress


Am using Devexpress Winforms 12.2 version. I designed XtraReport with Logo on right side. When image is small automatically it align to left. I need to set pull right. Their is no option to set alignment in property. How to write programmatically code in BeforePrint event of xrPictureBox ?

I tried this one but didn't work xrPictureBox1.Image = ContentAlignment.MiddleRight; showing error cannot implicitly convert type ContentAlignment to Drawing.Image

Thanks in Advance.


Solution

  • You'd better search their support channel, there are several threads on this subject, like XTraReport - XRPictureBox alignment and XRPictureBox - Provide the capability to specify image alignment. From the last one looks like they finally provided out of the box solution XRPictureBox.ImageAlignment Property, but you need to upgrade to v15.1. If you can't, check if some of the suggested workarounds in the links work for you.