Esempio n. 1
0
        protected override void OnPaint(PaintEventArgs e)
        {
            var g      = e.Graphics;
            var ratioX = Dpi.GetWidth(1);
            var ratioY = Dpi.GetHeight(1);

            g.FillRectangle(BorderColor.Brush(), new Rectangle(0, 0, Width, Height));
            g.FillRectangle(BackgroundColor.Brush(), new Rectangle(ratioX, ratioY,
                                                                   Width - ratioX * 2, Height - ratioY * 2));
        }