Example #1
0
        private void DrawButton(Graphics g)
        {
            EnumControlState enumControlState = (!GetComboBoxButtonPressed()) ? EnumControlState.Default : EnumControlState.HeightLight;
            Rectangle        rect             = new Rectangle(ButtonRect.X - 2, ButtonRect.Y - 1, ButtonRect.Width + 1 + _Margin, ButtonRect.Height + 2);
            RoundRectangle   roundRect        = new RoundRectangle(rect, new CornerRadius(0, _CornerRadius, 0, _CornerRadius));
            Blend            blend            = new Blend(3);

            blend.Positions = new float[3]
            {
                0f,
                0.5f,
                1f
            };
            blend.Factors = new float[3]
            {
                0f,
                1f,
                0f
            };
            GDIHelper.FillRectangle(g, roundRect, SkinManager.CurrentSkin.DefaultControlColor);
            Size arrowSize = new Size(12, 7);

            System.Windows.Forms.ArrowDirection direction = System.Windows.Forms.ArrowDirection.Down;
            GDIHelper.DrawArrow(g, direction, rect, arrowSize, 0f, Color.FromArgb(30, 178, 239));
            Color borderColor = SkinManager.CurrentSkin.BorderColor;

            GDIHelper.DrawGradientLine(g, borderColor, 90, rect.X, rect.Y, rect.X, rect.Bottom - 1);
        }
Example #2
0
        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
            Size     arrowSize = new Size(8, 8);
            Graphics graphics  = e.Graphics;

            GDIHelper.InitializeGraphics(graphics);
            Rectangle arrowRectangle = e.ArrowRectangle;

            arrowRectangle.X -= 2;
            GDIHelper.DrawArrow(graphics, e.Direction, arrowRectangle, arrowSize);
        }
Example #3
0
        private void DrawButton(Graphics g)
        {
            EnumControlState enumControlState = (!GetComboBoxButtonPressed()) ? EnumControlState.Default : EnumControlState.HeightLight;
            Rectangle        rect             = new Rectangle(ButtonRect.X, ButtonRect.Y - 1, ButtonRect.Width + 1 + _Margin, ButtonRect.Height + 2);
            RoundRectangle   roundRect        = new RoundRectangle(rect, new CornerRadius(0));

            GDIHelper.FillRectangle(g, roundRect, SkinManager.CurrentSkin.DefaultControlColor);
            GDIHelper.DrawArrow(arrowSize: new Size(12, 7), g: g, direction: System.Windows.Forms.ArrowDirection.Down, rect: rect, offset: 0f, c: Color.FromArgb(30, 178, 239));
            Color borderColor = SkinManager.CurrentSkin.BorderColor;

            GDIHelper.DrawGradientLine(g, borderColor, 90, rect.X, rect.Y, rect.X, rect.Bottom - 1);
        }
Example #4
0
        protected override void OnRenderOverflowButtonBackground(ToolStripItemRenderEventArgs e)
        {
            base.OnRenderOverflowButtonBackground(e);
            Graphics graphics = e.Graphics;

            GDIHelper.InitializeGraphics(graphics);
            ToolStripItem item   = e.Item;
            Rectangle     bounds = item.Bounds;

            bounds = new Rectangle(0, 0, bounds.Width, bounds.Height);
            Size arrowSize = new Size(8, 8);

            GDIHelper.DrawArrow(graphics, System.Windows.Forms.ArrowDirection.Down, bounds, arrowSize);
        }