SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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

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
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
    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
    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
    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
Showing 3 results
Your Answer

Please first to submit.