Example: I change the color of the series and series pointers and save the theme. But when I load that saved theme the color changes to orange. Following is code what I have done.
To save theme :
Code: Select all
private void SaveCustomTheme()
{
chartTestPeriod.Export.Theme.SaveWithBase64 = false;
String strPath;
strPath = Application.StartupPath.ToString();
strPath += @"\Theme";
string strFile = strPath + "\\Theme.xml";
try
{
if (!Directory.Exists(strPath))
{
Directory.CreateDirectory(strPath);
}
chartTestPeriod.Export.Theme.Save(strFile);
}
catch (Exception ex)
{
}
}
To load theme :
Code: Select all
private void LoadCustomTheme()
{
String strPath;
strPath = Application.StartupPath.ToString();
strPath += @"\Theme";
string strFile = strPath + "\\Theme.xml";
try
{
if (Directory.Exists(strPath))
{
chartTestPeriod.Import.Theme.Load(strFile);
}
}
catch (Exception ex)
{
}
}
Yatendra Kashyap