Choyee Posted October 18, 2009 Report Share Posted October 18, 2009 Hi, I've been working on implementing toolbar items for WPF charts as in ChartFX 7. I manged to export chart images as one of image file formats, but I couldn't find a way to exporting them to the clipboard. If I could find the properties related to the currently displayed chart image, I thought I might use the ApplicationCommands.Copy.Execute() method to copy to the clipboard. Any suggestions? Thanks. Quote Link to comment Share on other sites More sharing options...
JuanC Posted October 20, 2009 Report Share Posted October 20, 2009 If you want to copy the current chart image to the clipboard you would do something like this System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(); chart1.Export(FileFormat.Png, memoryStream); memoryStream.Position = 0; System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(memoryStream); Clipboard.SetDataObject(new DataObject(DataFormats.Bitmap, bmp), true); bmp.Dispose(); If you are looking to copy the data to the clipboard as text we do not support this built-in, you could obviously retrieve the data using our API and copy the text to the clipboard though. JuanC Quote Link to comment Share on other sites More sharing options...
Choyee Posted October 21, 2009 Author Report Share Posted October 21, 2009 It helps a lot, thanks. By the way, is there any plan for providing built-in toolbar as in ChartFX 7 in your WPF roadmap? It was a huge merit handling chart properties using the toolbar and the context menu in ChartFX 7. Quote Link to comment Share on other sites More sharing options...
JuanC Posted October 21, 2009 Report Share Posted October 21, 2009 Yes, we plan to provide UI (whether is a toolbar, menu, or something else is still undefined) in future Chart FX for WPF versions. JuanC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.