protected override void DrawContent(ControlGraphicsInfoArgs info)
        {
            info.Graphics.FillRectangle(info.Cache.GetSolidBrush(Color.White), info.ViewInfo.ClientRect);
            QuickCustomizationIcon icon = ((QuickHideEditViewInfo)info.ViewInfo).GetIcon;

            if (icon.Image != null)
            {
                ImageAttributes attr = new ImageAttributes();
                attr.SetColorKey(icon.TransperentColor, icon.TransperentColor);
                info.Cache.Paint.DrawImage(info.Cache.Graphics, icon.Image, info.ViewInfo.ClientRect);
            }
        }
 public CustomGridOptionsCustomization()
     : base()
 {
     this.allowQuickCustomisation = true;
     quickCustomizationIcon       = new QuickCustomizationIcon();
 }
        protected virtual void DrawQuickCustomisationIconCore(GridViewDrawArgs e, IndicatorObjectInfoArgs info, QuickCustomizationIcon icon, Rectangle bounds, QuickCustomisationIconStatus status)
        {
            Rectangle          patchedRec = new Rectangle(bounds.X + 1, bounds.Y, bounds.Width - 1, bounds.Height);
            GridColumnInfoArgs args       = new GridColumnInfoArgs(e.Cache, e.ViewInfo.ColumnsInfo[0].Column);

            args.Cache  = e.Cache;
            args.Bounds = patchedRec;
            ((HeaderObjectInfoArgs)args).HeaderPosition = HeaderPositionKind.Center;
            if (status == QuickCustomisationIconStatus.Hot)
            {
                ((HeaderObjectInfoArgs)args).State = ObjectState.Hot;
            }
            ElementsPainter.Column.DrawObject(args);

            if (icon.Image != null)
            {
                Rectangle rec = new Rectangle();
                rec.Location = new Point(bounds.Left + 1, bounds.Top + 1);
                rec.Size     = new Size(bounds.Width - 2, bounds.Height - 2);
                ImageAttributes attr = new ImageAttributes();
                attr.SetColorKey(icon.TransperentColor, icon.TransperentColor);
                e.Cache.Paint.DrawImage(e.Cache.Graphics, icon.Image, rec);
            }
        }