Jump to content
Software FX Community

Set/Get personalization file


User (Legacy)

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...