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 |
Product Version | 2019.2 902 |
Product | RadChartView for WPF |
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."
Instead of the StrokeDashArray property of the Line element, set the MajorXLineDashArray and MajorYLineDashArray properties of the CartesianChartGrid element.
{{region kb-chartview-invalid-operation-exception-strokedasharray-0}} telerik:RadCartesianChart.Grid <telerik:CartesianChartGrid MajorXLineDashArray="4,2" MajorYLineDashArray="4,2" > </telerik:RadCartesianChart.Grid> {{endregion}}