We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Serialize : XamlRader.Parse throws Exception for set DataModel.CharListData

Thread ID:





97259 Nov 12,2010 01:19 PM UTC Nov 19,2010 05:11 AM UTC WPF 4
Tags: Chart
Asked On November 12, 2010 01:19 PM UTC

I saw serialization was added on 8.4.
I start from RangeAreaChart that I modify getting 3 chartseries. On Serialized (XamlWriter.Write) it's ok I've a string that's my object (I serialize the ChartSerie root).

But when I Parse xml for creating my object, I got this error :

XamlParseException : Set property 'Syncfusion.Windows.Chart.ChartDataModel.ChartPoints' threw an exception.

InnerException : Object of type 'System.String' cannot be converted to type 'Syncfusion.Windows.Chart.ChartListData'.

Part of generated string, about ChartDataModel :

///Fucntion for save => creating string from xmal object
private void Save_Click(object sender, RoutedEventArgs e)
String s = System.Windows.Markup.XamlWriter.Save(Chart1);
SaveValue.Text = s;

/// Function for create object with string
private void Load_Click(object sender, RoutedEventArgs e)
Chart1 = (Chart)System.Windows.Markup.XamlReader.Parse(SaveValue.Text); //I Got error here
AddDataToSeries(); //populate data

I don't populate chart before save/restore, so I don't understand why this error.

I read you set a minimal support for serialize, can we got more informations about what we can/cannot serialize ?

Thanks :)



Replied On November 12, 2010 02:56 PM UTC

I would look into Syncfusion_Chart.WPF_2010 for ChartDataModel class definition (C:\Program Files (x86)\Syncfusion\Essential Studio\\WPF\Chart.WPF\Src), VS 2010 found the property ChartSerie.ChartDataModel, but no class ChartDataModel...

If I open the syncfusion.chart.wpf dll in reflector (version .net 4.0), ChartDataModel is here, so I don't understand, are the source not up to date ?


Senthilkumar N [Syncfusion]
Replied On November 15, 2010 04:49 AM UTC

Hi Arnard,

Thanks for choosing Syncfusion Products.

We have already identified and fixed your mentioned issue in our latest source.

Please create a Direct-trac incident for this issue, so we will update you the custom patch with fix for this issue.

We use ChartDataModel class as shared class for Syncfusion.Chart.Silverlight and Syncfusion.Chart.Wpf, so it is available in Syncfusion.Chart.Silverlight.

Please Let us know if you have any Queries.


Replied On November 18, 2010 03:16 PM UTC

Very Well, I tried it, it's nice !

And there is few limitations for serialization : only BindingY, AxeX, AxeY, it's nice if the others properties are ok !

Senthilkumar N [Syncfusion]
Replied On November 19, 2010 05:11 AM UTC

Hi Arnard,

We are glad to hear that your problem has been resolved. Please do not hesitate to open a new support incident if you ever need further assistance from us.

Thanks for choosing Syncfusion Products.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon