Ejemplo n.º 1
0
        private ShapeRectangle ConvertShape(ButtonBorder border)
        {
            ShapeRectangle shape = null;

            switch (border)
            {
            case ButtonBorder.Rectangle:
                shape = new ShapeRectangle(0, 0, _width - 1, _height - 1);
                break;

            case ButtonBorder.RoundRectangle:
                shape = new ShapeRoundRectangle(0, 0, _width - 1, _height - 1, _cornerRadius);
                break;

            case ButtonBorder.Ellipse:
                shape = new ShapeEllipse(0, 0, _width - 1, _height - 1);
                break;
            }
            if (shape != null)
            {
                shape.Brush = _fillBrushNormal;
                shape.Pen   = _borderPenNormal;
            }
            return(shape);
        }
Ejemplo n.º 2
0
        public GroupPanel()
        {
            _shape = new ShapeRoundRectangle(new Rectangle(0, 0, 100, 100), 6);

            _fillColor   = Color.Transparent;
            _borderColor = SystemColors.ControlDark;

            _shape.Pen   = new Pen(_borderColor);
            _shape.Brush = new SolidBrush(_fillColor);
        }