Esempio n. 1
0
        public override void DrawCloseButton(CloseButtonRendererEventArgs args)
        {
            Rectangle rect = args.Bounds;
            rect.Inflate(-4, -4);
            if (args.IsDown)
            {
                args.Graphics.FillRectangle(ColorTable.DownKeysBrush, args.Bounds);
                using (Pen p = new Pen(ColorTable.DownTextBrush, 4))
                {
                    args.Graphics.DrawLine(p, rect.Left, rect.Top, rect.Right, rect.Bottom);
                    args.Graphics.DrawLine(p, rect.Left, rect.Bottom, rect.Right, rect.Top);
                }
            }
            else
            {
                //args.Graphics.FillRectangle(ColorTable.KeysBrush, args.Bounds);
                using (Pen p = new Pen(ColorTable.TextBrush, 4))
                {
                    args.Graphics.DrawLine(p, rect.Left, rect.Top, rect.Right, rect.Bottom);
                    args.Graphics.DrawLine(p, rect.Left, rect.Bottom, rect.Right, rect.Top);
                }
            }

        }
Esempio n. 2
0
 public abstract void DrawCloseButton(CloseButtonRendererEventArgs args);