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 login to post comments
@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
- Andrew Burnett-Thompson answered 7 years ago
-
4.1.1.8683 :(
-
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 login to post comments
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
- Guest answered 10 years ago
- You must login to post comments
Hello,
Has this issue been resolved? One of our users fired a print and it brought the whole application down.
Thanks,
-Thomas
- mijothomas answered 7 years ago
-
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.
-
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 login to post comments
Please login first to submit.