Exemplo n.º 1
0
 protected virtual void DrawTabCloser(int index, Graphics graphics)
 {
     if (this._ShowTabCloser)
     {
         Rectangle closerRect = this._TabControl.GetTabCloserRect(index);
         graphics.SmoothingMode = SmoothingMode.AntiAlias;
         using (GraphicsPath closerPath = TabStyleProvider.GetCloserPath(closerRect))
         {
             if (closerRect.Contains(this._TabControl.MousePosition))
             {
                 using (Pen closerPen = new Pen(this._CloserColorActive))
                 {
                     graphics.DrawPath(closerPen, closerPath);
                 }
             }
             else
             {
                 using (Pen closerPen = new Pen(this._CloserColor))
                 {
                     graphics.DrawPath(closerPen, closerPath);
                 }
             }
         }
     }
 }