public PlotSurface2D()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
// double buffer, and update when resize.
base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
//base.SetStyle(ControlStyles.DoubleBuffer, true);
base.SetStyle(ControlStyles.UserPaint, true);
base.ResizeRedraw = true;
ps_ = new NPlot.PlotSurface2D();
this.InteractionOccured += new InteractionHandler(OnInteractionOccured);
this.PreRefresh += new PreRefreshHandler(OnPreRefresh);
}