// Shared initialization code void Initialize() { this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable; BackColor = Color.Wheat; PlotPanel = new PlotPanel(Frame); this.AddSubview(PlotPanel); // Subscribing to a paint eventhandler to drawingPanel: PlotPanel.Paint += new PaintEventHandler(PlotPanelPaint); // Set Form1 size: // this.Width = 350; // this.Height = 300; // Subscribing to a paint eventhandler to drawingPanel: dc = new DataCollection(); cs = new ChartStyle(this); cs.XLimMin = 0f; cs.XLimMax = 10f; cs.YLimMin = 0f; cs.YLimMax = 10f; cs.XTick = 2.0f; cs.YTick = 2.0f; cs.XLabel = "This is X axis"; cs.YLabel = "This is Y axis"; cs.Title = "Area Plot"; cs.IsXGrid = true; cs.IsYGrid = true; }