3 Answers, 1 is accepted
Thank you for writing.
The possible solution that I can suggest is to export RadChartView to an image and set this image to Clipboard. The following help article is quite useful about the export functionality: http://docs.telerik.com/devtools/winforms/chartview/features/export
You can refer to the following stackOverflow thread where it is discussed how to set an image to Clipboard: http://stackoverflow.com/questions/16964152/how-do-i-put-an-image-on-the-clipboard
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik by Progress
Hi Dess.
I have been able to export the image to a stream using the following code:
Dim ms As New System.IO.MemoryStream
Me.RadChartView1.ExportToImage(ms, Me.RadChartView1.Size, System.Drawing.Imaging.ImageFormat.Jpeg)
However, the code does not work for emf image format.
If I use the code:
Dim ms As New System.IO.MemoryStream
Me.RadChartView1.ExportToImage(ms, Me.RadChartView1.Size, System.Drawing.Imaging.ImageFormat.Emf)
I get the following error:
System.ArgumentNullException: Value cannot be null.
Parameter name: encoder
I get the same error when I try to export to file in emf format:
Me.RadChartView1.ExportToImage(dialog.FileName, Me.RadChartView1.Size, System.Drawing.Imaging.ImageFormat.Emf)
Thank you for writing back.
The ExportToImage method tries to save a Bitmap to the specified format. However, it seems that saving emf files should be handled in a different way. Please refer to the following stackOverflow threads:
http://stackoverflow.com/questions/152729/gdi-c-how-to-save-an-image-as-emf
http://stackoverflow.com/questions/5270763/convert-an-image-into-wmf-with-net
I have logged it in our feedback portal and I have added a vote for it on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.
I have also updated your Telerik points.
Currently, the possible solution that I can suggest is to use one of the other ImageFormats.
I hope this information helps. If you have any additional questions, please let me know.Regards,
Dess
Telerik by Progress