private void DrawTabPage(int index, Graphics graphics)
{
graphics.SmoothingMode = SmoothingMode.HighSpeed;
// Get TabPageBorder
using (GraphicsPath tabPageBorderPath = this.GetTabPageBorder(index)) {
// Paint the background
using (Brush fillBrush = this._StyleProvider.GetPageBackgroundBrush(index)){
graphics.FillPath(fillBrush, tabPageBorderPath);
}
if (this._Style != TabStyle.None){
// Paint the tab
this._StyleProvider.PaintTab(index, graphics);
// Draw any image
this.DrawTabImage(index, graphics);
// Draw the text
this.DrawTabText(index, graphics);
}
// Paint the border
this.DrawTabBorder(tabPageBorderPath, index, graphics);
}
}