Inheritance: AppKit.NSView
Ejemplo n.º 1
0
        // Shared initialization code
        void Initialize()
        {
            this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
            BackColor             = Color.Wheat;

            var panelRect = new CGRect(Frame.X, Frame.Y, Frame.Width, Frame.Height);

            panelRect.Inflate(-20, -20);
            panel1           = new PlotPanel(panelRect);
            panel1.BackColor = Color.AliceBlue;

            this.AddSubview(panel1);

            // Subscribing to a paint eventhandler to drawingPanel:
            panel1.Paint +=
                new PaintEventHandler(PlotPanelPaint);
        }
Ejemplo n.º 2
0
        // Shared initialization code
        void Initialize()
        {
            this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
            BackColor = Color.Wheat;

            var panelRect = new CGRect(Frame.X,Frame.Y,Frame.Width,Frame.Height);
            panelRect.Inflate(-20,-20);
            panel1 = new PlotPanel(panelRect);
            panel1.BackColor = Color.AliceBlue;

            this.AddSubview (panel1);

            // Subscribing to a paint eventhandler to drawingPanel:
            panel1.Paint +=
                new PaintEventHandler (PlotPanelPaint);
        }