Pre loader

Exporting SciChartSurface to bitmap blocks UI thread

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


Dear SciChart people,

when trying to export a SciChartSurface instance present in a view (i.e. modified by zoom and series visibility settings etc. done by the user in the UI), it seems that its member functions
may only be called from the UI thread – invocations from a background thread yield an InvalidOperation exception

So for the period of exporting, the application stays unresponsive even when “useXamlRenderSurface=false” is set in the call.

This does not change when trying to clone the surface, using a derived SciChartSurface class (still in in the view) that allows for cloning (cf . the SciChartEx class in the “CreateAnnotationsDynamically” SciChart example): calling CreateCloneSurfaceInMemory is still only allowed on the UI thread.
If one accepts this, but tries to continue with a background thread on the cloned surface’ s ExportToFile instance, it still mandates using the UI thread, so no escape …

Any ideas to go away from the UI thread in this scenario?

Thanks a lot.

  • You must to post comments

Hello Paul,

Unfortunately SciChart exporting feature works only in UI thread in currently supported version. But maybe you can tell us what you’re trying to achieve, and what you’ve tried so far. Maybe there is another way to achieve creating images of the chart without blocking UI thread.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.