Skip to content

Latest commit

 

History

History
42 lines (35 loc) · 1.48 KB

kb-chartview-invalid-operation-exception-strokedasharray.md

File metadata and controls

42 lines (35 loc) · 1.48 KB
title description type page_title slug position tags ticketid res_type
Exception Thrown Attempting to Set StrokeDashArray on CartesianChartGrid
Specified value of type System.Windows.Media.DoubleCollection must have IsFrozen set to false to modify - occurs if you set StrokeDashArray property in MajorXLineStyle or MajorYLineStyle.
troubleshooting
InvalidOperationException Thrown When Setting CartesianChartGrid Line StrokeDashArray Property
kb-chartview-invalid-operation-exception-strokedasharray
0
strokedasharray,majorlinestyle,chartview
1429449
kb

Environment

Product Version 2019.2 902
Product RadChartView for WPF

Description

InvalidOperationException is thrown when setting the StrokeDashArray property of the CartesianChartGrid lines through the MajorXLineStyle or MajorYLineStyle properties.

The error message is: "Specified value of type 'System.Windows.Media.DoubleCollection' must have IsFrozen set to false to modify."

Solution

Instead of the StrokeDashArray property of the Line element, set the MajorXLineDashArray and MajorYLineDashArray properties of the CartesianChartGrid element.

[XAML]

{{region kb-chartview-invalid-operation-exception-strokedasharray-0}} telerik:RadCartesianChart.Grid <telerik:CartesianChartGrid MajorXLineDashArray="4,2" MajorYLineDashArray="4,2" > </telerik:RadCartesianChart.Grid> {{endregion}}