System.Windows.Forms.CustomTabControl.DrawTabBorder C# (CSharp) Method

DrawTabBorder() private method

private DrawTabBorder ( GraphicsPath path, int index, Graphics graphics ) : void
path System.Drawing.Drawing2D.GraphicsPath
index int
graphics System.Drawing.Graphics
return void
        private void DrawTabBorder(GraphicsPath path, int index, Graphics graphics)
        {
            graphics.SmoothingMode = SmoothingMode.HighQuality;
            Color borderColor;
            if (index == this.SelectedIndex) {
                borderColor = this._StyleProvider.BorderColorSelected;
            } else if (this._StyleProvider.HotTrack && index == this.ActiveIndex) {
                borderColor = this._StyleProvider.BorderColorHot;
            } else {
                borderColor = this._StyleProvider.BorderColor;
            }

            using (Pen borderPen =new Pen(borderColor)){
                graphics.DrawPath(borderPen, path);
            }
        }