This question is locked. New answers and comments are not allowed.
Hi, I've used your sample from
http://www.telerik.com/help/silverlight/radganttview-exportingsupport.html
to export my RadGanttView, but printing does not work properly.
The conversion between BitmapSource and Image does not seem to work, because all properties of the image are set to 0.0 (eg. ActualWidth, Width=NaN,...). The bitmap seems to be ok!
When I print to XPS, the filesize of the produced .oxps file is 0 bytes.
http://www.telerik.com/help/silverlight/radganttview-exportingsupport.html
to export my RadGanttView, but printing does not work properly.
The conversion between BitmapSource and Image does not seem to work, because all properties of the image are set to 0.0 (eg. ActualWidth, Width=NaN,...). The bitmap seems to be ok!
private static UIElement PrintPage(BitmapSource bitmap){ var bitmapSize = new System.Windows.Size(bitmap.PixelWidth, bitmap.PixelHeight); var image = new System.Windows.Controls.Image { Source = bitmap }; image.Measure(bitmapSize); image.Arrange(new System.Windows.Rect(new System.Windows.Point(0, 0), bitmapSize)); return image;}When I print to XPS, the filesize of the produced .oxps file is 0 bytes.