Pre loader

Export image to file and/or a byte array

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


I have more than one chart in my UI, and they are on separate tabs. As soon as I call .ExportToBitmapSource() for one of the charts that is not shown (it’s tab is not selected) an exception is thrown… UIElement.Measure(availableSize) cannot be called with NaN size. Is there a way around this?

I saw yesterday in the documentation that it appears the product doesn’t support this. That would be a big bummer.

  • You must to post comments

Hi Chris,

In WPF, when a tab is hidden, the View is actually garbage collected and destroyed – it no longer exists! So yes, we don’t support this…

SciChart however does have some mechanisms to export an image while off-screen. Again WPF doesn’t support this, so we had to do a high level of hacks and magic to make it happen. You can learn about the API to export off-screen here.

Export to BitmapSource at Specific Size

SciChart supports exporting to BitmapSource (in-memory bitmap) at a specific resolution and size….

There are also a number of caveats for exporting off-screen. We have to take a clone or copy of the entire chart in memory to achieve it. Sometimes things like styling is lost. You can read about caveats here.

Best regards,

  • Chris Kirkman
    Yeah, that’s not going to work. :( It’s the “caveats” that got me. I’m trying a separate method that I’ll mention in another thread.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies