public Form1()
{
InitializeComponent(); this.Resize += new System.EventHandler(this.formResize);
//Use double-buffering for flicker-free updating:
SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint
| ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.SupportsTransparentBackColor, true); Rectangle rect = new Rectangle(0, 0, this.Size.Width-15, this.Size.Height-30);
_masterPane = new MasterPane("", rect);
_masterPane.Margin.All = 0;
_masterPane.Title.IsVisible = false; string titleStr = "Title";
string xStr = "X Axis";
string yStr = "Y Axis"; GraphPane graphPane = new GraphPane(rect, titleStr, xStr, yStr);
using (Graphics g = this.CreateGraphics())
{
graphPane.AxisChange(g);
}
_masterPane.Add(graphPane); }
{
InitializeComponent(); this.Resize += new System.EventHandler(this.formResize);
//Use double-buffering for flicker-free updating:
SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint
| ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.SupportsTransparentBackColor, true); Rectangle rect = new Rectangle(0, 0, this.Size.Width-15, this.Size.Height-30);
_masterPane = new MasterPane("", rect);
_masterPane.Margin.All = 0;
_masterPane.Title.IsVisible = false; string titleStr = "Title";
string xStr = "X Axis";
string yStr = "Y Axis"; GraphPane graphPane = new GraphPane(rect, titleStr, xStr, yStr);
using (Graphics g = this.CreateGraphics())
{
graphPane.AxisChange(g);
}
_masterPane.Add(graphPane); }
Pen p = new Pen(Color.Red);
g.DrawLine(p, new Point(100, 100), new Point(200, 200));