Copy chart to clipboard

Nov 24, 2012 at 12:59 PM


Thanks for a great project. It really works!


I am currently using it for a project that generates various barchart- and scatter charts. I'm using WPF and MVVM where the PlotModel is generated in the viewmodel each time the user changes criteria. The chart itself is hosted in <oxy:ploy> control.

I need to be able to copy the visual representation (i.e. the <oxy:plot> control) to the clipboard. Preferably as a vector image to insert into MS Office applications. I know that generating WMF/EMF files from WPF is challenging at best so a simple bitmap could also do.

What is the best way of accomplishing this? Thanks.

Nov 26, 2012 at 5:05 AM

Try Ctrl-C, the Plot control is bound to ApplicationCommands.Copy.

The Plot control also has SaveBitmap, ToBitmap, ToXaml,  methods.

Or use PngExporter, SvgExporter, PdfExporter etc.

Mar 18, 2013 at 2:33 PM
I've searched all of the .NET 4 source and the only reference I find to Keys.C is in Plot.cs (WinForm) (OnPreviewKeyDown) and that section of code doesn't copy a BMP to the clipboard. If anyone can shed light, it would be much appreciated.