We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to custom paint MDI TabPanel to have office 2003 look and feel in WinForms TabbedMDIManager?

Platform: WinForms |
Control: TabbedMDIManager

Customize the MDI tab panel

Derive CustomTabPanelProperty from the TabPanelProperty (TabPanelProperty3D in this case) for the appropriate TabStyle and then register the TabType with the TabRendererFactory. Please refer the below code snippet which illustrates this:


TabRendererFactory.RegisterTabType(TabRendererWhidbey.TabStyleName, typeof(TabRendererWhidbey), new CustomTabPanelProperty());
void tb_TabControlAdded(object sender, TabbedMDITabControlEventArgs args)
    args.TabControl.TabStyle = typeof(TabRendererWhidbey);
public class CustomTabPanelProperty : Syncfusion.Windows.Forms.Tools.TabPanelProperty3D
    public override void OnPaintPanelBackground(ITabControl tabControl, Graphics g, Color bgColor, Rectangle bounds)
        System.Drawing.Drawing2D.LinearGradientBrush lgb = new System.Drawing.Drawing2D.LinearGradientBrush(bounds, Color.FromArgb(235, 235, 244), Color.FromArgb(186, 185, 206), System.Drawing.Drawing2D.LinearGradientMode.Vertical);
g.FillRectangle(lgb, bounds);


Syncfusion.Windows.Forms.Tools.TabRendererFactory.RegisterTabType(Syncfusion.Windows.Forms.Tools.TabRendererWhidbey.TabStyleName, GetType(Syncfusion.Windows.Forms.Tools.TabRendererWhidbey), New CustomTabPanelProperty())
Private Sub tb_TabControlAdded(ByVal sender As Object, ByVal args As TabbedMDITabControlEventArgs)
    args.TabControl.TabStyle = GetType(TabRendererWhidbey)
End Sub
Public Class CustomTabPanelProperty : Inherits Syncfusion.Windows.Forms.Tools.TabPanelProperty3D
    Public Overrides Sub OnPaintPanelBackground(ByVal tabControl As Syncfusion.Windows.Forms.Tools.ITabControl, ByVal g As Graphics, ByVal bgColor As Color, ByVal bounds As Rectangle)
        Dim lgb As System.Drawing.Drawing2D.LinearGradientBrush = New System.Drawing.Drawing2D.LinearGradientBrush(bounds, Color.FromArgb(235, 235, 244), Color.FromArgb(186, 185, 206), System.Drawing.Drawing2D.LinearGradientMode.Vertical)
g.FillRectangle(lgb, Bounds)
    End Sub
End Class


2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile