User (Legacy) Posted September 16, 2006 Report Share Posted September 16, 2006 How can I get and save the personalization file (which is in the .net isolated storage) and save it as an xml string to an access datatabase? Later on I would like to read this string and pass it in to chart fx to populate the chart with the saved settings. Any code examples or references available? Thanks giannik Link to comment Share on other sites More sharing options...
Software FX Posted September 18, 2006 Report Share Posted September 18, 2006 Rather than getting the data from the file, What you want to do is override the Personalize.Save to do your own thing, which is saving the chart to a template into your database and not into a file. To do this you can capture the InternalCommandEvent as follows: private void chart1_InternalCommand(object sender, CommandUIEventArgs e) { MemoryStream stream = new MemoryStream(); chart1.Export(FileFormat.BinaryTemplate,stream); byte[] bytes = stream.GetBuffer(); //TODO: Save bytes into DB } Notice that the implementation of personalization is done through binary templates not using XML, you can change this by exporting to XML and setting FileMask to TemplateMask right before the call to export to save only those settings saved in a template. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.