Inheritance: AppKit.NSView
コード例 #1
0
        // Shared initialization code
        void Initialize()
        {
            this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
            BackColor             = Color.Wheat;

            var panelRect = new RectangleF(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);
        }
コード例 #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);
        }