How to Convert size of BitmapImage from pixel to ReportUnit

Stimulsoft Reports.Silverlight discussion
Locked
Hoang Nguyen
Posts: 11
Joined: Wed Jun 15, 2011 10:19 pm
Location: VN

How to Convert size of BitmapImage from pixel to ReportUnit

Post by Hoang Nguyen »

Hi,
I want to add a StiImage Component by code to my report template and the size of StiImage Component must fit to size of BitmapImage. But I can't find any way to convert size of BitmapImage from pixel to ReportUnit(ect: Centimet....)
Please help me!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

How to Convert size of BitmapImage from pixel to ReportUnit

Post by Alex K. »

Hello,

Please check the following code:

Code: Select all

StiReport report = new StiReport();
report.Unit.ConvertToHInches
Thank you.
Hoang Nguyen
Posts: 11
Joined: Wed Jun 15, 2011 10:19 pm
Location: VN

How to Convert size of BitmapImage from pixel to ReportUnit

Post by Hoang Nguyen »

Hi, thank you
I used the following code:

Code: Select all

StiReport report = new StiReport();
report.Unit.ConvertFromHInches(image.Width);
It work fine.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

How to Convert size of BitmapImage from pixel to ReportUnit

Post by Alex K. »

Hello,

Ok.
Let us know if you need any additional help.
Locked