Pre loader

SciChartSurface does not print with Chrome theme

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

1
0

I get the following exception:

{System.InvalidOperationException: Cannot set a property on object ‘System.Windows.Media.LinearGradientBrush’ because it is in a read-only state.

Other themes print fine, like BrightSpark. I guess Chrome has a problem because of its gradient background. I plan on using BrightSpark, so this is not a problem for me.

Here is the code I used:

        private void PrintMenuItem_Click(object sender, RoutedEventArgs e)
    {
        var dialog = new PrintDialog();
        if (dialog.ShowDialog() == true)
        {
            dialog.PrintVisual(FormationChart, "Formation Chart");
        }
    }
  • You must to post comments
0
0

Hello,

Has this issue been resolved? One of our users fired a print and it brought the whole application down.

Thanks,
-Thomas

  • Andrew Burnett-Thompson
    Hi Thomas, what version of SciChart are you using? We have resolved a lot of bugs (thousands) over the years. If you are using a relatively recent version then its possible the issue still exists.
  • Andrew Burnett-Thompson
    Hi Thomas, see my answer I just posted. I tested this with v4.2.3 and it works – Chrome exports. Best regards, Andrew
  • You must to post comments
0
0

@Thomas who commented on this issue today. I just did some testing with SciChart v4.2.3.

Steps to reproduce:

1.) Start SciChart WPF v4.2.3 Examples
2.) Search and open the ‘Export and Screenshot Options in Chart’
3.) Select Settings -> Enable Dev Mode
4.) Back in the example, change the theme to Chrome
5.) Hit the Print button

It seems to export without exception.

Best regards,
Andrew

  • mijothomas
    4.1.1.8683 :(
  • Andrew Burnett-Thompson
    Plz update :) In seriousness … I don’t know exactly what version this was fixed in, but we do fix a lot of reported issues. If you are able to consider updating, it’s a good move. If you need our help, just contact us on support. Best regards, Andrew
  • You must to post comments
0
0

Hi there,

Thank you for reporting this issue. I logged it and we will investigate and try to fix.

At first sight, it looks like occurring when something tries to change properties of a sealed brush. Actually, you could workaround this by setting SciChartSurface.Background to a SolidBrush instead of the default GradientBrush, or use another theme (as you suggested).

Best regards,
Yuriy

  • You must to post comments
Showing 3 results
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