protected virtual void DrawIcon(ControlGraphicsInfoArgs info) { MyMemoEditViewInfo vi = info.ViewInfo as MyMemoEditViewInfo; Image img = vi.GetImage(); if (img != null) { Rectangle rec = new Rectangle(info.Bounds.X + vi.IconRect.X, info.Bounds.Y + vi.IconRect.Y, vi.IconRect.Width, vi.IconRect.Height); info.Graphics.DrawImage(img, rec); } else { info.Graphics.FillRectangle(info.Cache.GetSolidBrush(Color.White), vi.IconRect); } }