public DXBezierControl() { Controller = new BezierController(); Controller.DrawRequired += Controller_DrawRequired; InitializeComponent(); Disposed += DXBezierControl_Disposed; }
public BezierControl() { Controller = new BezierController(); Controller.DrawRequired += Controller_DrawRequired; InitializeComponent(); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); context = BufferedGraphicsManager.Current; context.MaximumBuffer = new Size(this.Width + 1, this.Height + 1); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); grafx = context.Allocate(this.CreateGraphics(), new Rectangle(0, 0, this.Width, this.Height)); DrawToBuffer(grafx.Graphics); }