Hi Jim,
The problem with the state is that .NET cannot read binary serialized state when the assembly version changes. On the other hand we had to choose from XML or Binary when there is a designer on the form and decided to go with Binary serialization as it is much faster (otherwise the form compiles Ok after a new version is installed, but takes too much time to load). There a couple of workarounds:
1. You can delete the following line from InitializeComponent:
this
.nChartControl1.State = ((Nevron.Chart.WinForm.NState)(resources.GetObject("nChartControl1.State")));and the form will compile when you change the version of the control + it will load much faster.
2. You can create a simple user control that nests the chart:
using System.Windows.Forms;
using Nevron.Chart.WinForm;
namespace WindowsFormsApplication1
{
public partial class NCustomChartControl : UserControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
public NCustomChartControl()
{
nChartControl1 = new NChartControl();
nChartControl1.Dock = DockStyle.Fill;
this.Controls.Add(nChartControl1);
}
public Nevron.Chart.WinForm.NChartControl nChartControl1;
}
}
That way when you insert the control in a form it will not generate code to load / save the state from binary.
Hope this helps - let us know if you meet any problems or have any questions.
Best Regards,
Nevron Support Team