Hi,
I’m trying to get the snapshot of SciChart when it’s first loaded to send the rendered graph to an external application without rendering it on the screen in WPF. Calling .ExportToBitmapSource() gets the graph without the data and annotations. I’m currently using v3.2.1.5511. If I bind the function to a button and call the function after it’s rendered, it has no problems and displays it nicely.
this is what my constructor looks like,
_ChartSurface.Height = 500;
_ChartSurface.Width = 500;
_ChartSurface.Measure(new Size(this.ActualWidth, this.ActualHeight));
_ChartSurface.Arrange(new Rect(new Point(0, 0), this.DesiredSize));
_ChartSurface.UpdateLayout();
var bmp = _ChartSurface.ExportToBitmapSource();
Clipboard.SetImage(bmp);
I have included a sample project for you guys to see what I’m talking about. The image is automatically copied to clipboard, so you can use a paint program to just paste the image. You can download the project from here, the site seems to have problems while uploading zip files. http://www.filedropper.com/scichartshiftedaxissample
Thanks
- kewur asked 9 years ago
- last edited 9 years ago
- You must login to post comments
Hi Kewur.
Could you try to download the latest build fromNuget and test whether you can reproduce the issue with it? We have recently fixed some regressions in v3.2 related to export to bitmap and I think everything should be ok with latest build.
Thanks in advance.
- Yura Khariton answered 9 years ago
-
I can't seem to find the Nuget package with visual studio, is it still up?
-
You can see our NuGet status here: http://abtsoftware-prd.cloudapp.net:81. It does seem to be up
-
OK, turns out my company blocks port 81 (: I managed to test it, and it seems to be fixed now, thank you! P.S: you seem to have fixed some other problems I used to have too, so thanks for that. Axes seem to snap nicely with graphs now.
-
Great!
- You must login to post comments
Please login first to submit.