)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the appearance of the WinForms MainFrameBarManager with custom colors?

Platform: WinForms |
Control: MainFrameBarManager |
Published Date: June 17, 2015 |
Last Revised Date: January 5, 2020

Appearance

In MainFrameBarManager, the custom colors can be applied by setting the Office2007Theme as Managed and specify the custom color to MainFrameBarManager by using the ApplyManagedColors function in Office2007Colors. The GetColorTable function in Office2007Colors helps to get the colors from all the Office2007Theme.

 

Note:

“ApplyManagedColors” is also applicable for Office2007Form and Office2010Form.

C#

//Specifies the style of MainFrameBarManager
this.mainFrameBarManager1.Style = VisualStyle.Office2007;
//Applies the color scheme of the form
this.ColorScheme = Office2007Theme.Blue;
//Sets the color scheme for the MainFrameBar Manager
this.mainFrameBarManager1.Office2007Theme = Office2007Theme.Blue;
//Gets the back color of the Form background
Color backColor = Office2007Colors.GetColorTable(Office2007Theme.Blue).FormBackground;
this.BackColor = backColor;
//Applies the color scheme of the form
this.ColorScheme = Office2007Theme.Black;
//Sets the color sheme for the MainFrameBar Manager
this.mainFrameBarManager1.Office2007Theme = Office2007Theme.Black;
//Gets the Form backcolor
Color backColor = Office2007Colors.GetColorTable(Office2007Theme.Black).FormBackground;
this.BackColor = backColor;
//Applies the color scheme of the Office2007Form
this.ColorScheme = Office2007Theme.Silver;
//Sets the color sheme for the MainFrameBar Manager
this.mainFrameBarManager1.Office2007Theme = Office2007Theme.Silver;
//Gets the back color of the Form background
Color backColor = Office2007Colors.GetColorTable(Office2007Theme.Silver).FormBackground;
this.BackColor = backColor;
//Applies the color scheme of the Office2007Form
this.ColorScheme = Office2007Theme.Managed;
//Sets the color sheme for the MainFrameBar Manager
this.mainFrameBarManager1.Office2007Theme = Office2007Theme.Managed;
Office2007Colors.ApplyManagedColors(this, Color.Crimson);
Color backColor = Office2007Colors.GetColorTable(Office2007Theme.Managed).FormBackground;
this.BackColor = backColor;

VB

'Specifies the style of MainFrameBarManager
Me.mainFrameBarManager1.Style = VisualStyle.Office2007
'Applies the color scheme of the form
Me.ColorScheme = Office2007Theme.Black
'Sets the color scheme for the MainFrameBar Manager
Me.mainFrameBarManager1.Office2007Theme = Office2007Theme.Black
'Gets the Form backcolor
Dim backColor As Color = Office2007Colors.GetColorTable(Office2007Theme.Black).FormBackground
Me.BackColor = backColor
'Applies the color scheme of the form
Me.ColorScheme = Office2007Theme.Blue
'Sets the color sheme for the MainFrameBar Manager
Me.mainFrameBarManager1.Office2007Theme = Office2007Theme.Blue
'Gets the back color of the Form background
Dim backColor As Color = Office2007Colors.GetColorTable(Office2007Theme.Blue).FormBackground
Me.BackColor = backColor
'Applies the color scheme of the Office2007Form
Me.ColorScheme = Office2007Theme.Silver
'Sets the color sheme for MainFrameBar Manager
Me.mainFrameBarManager1.Office2007Theme = Office2007Theme.Silver
'Gets the back color of the Form background
Dim backColor As Color = Office2007Colors.GetColorTable(Office2007Theme.Silver).FormBackground
Me.BackColor = backColor
'Applies the color scheme of the Office2007Form
Me.ColorScheme = Office2007Theme.Managed
'Sets the color sheme for MainFrameBar Manager
Me.mainFrameBarManager1.Office2007Theme = Office2007Theme.Managed
Office2007Colors.ApplyManagedColors(Me, Color.Crimson)
Dim backColor As Color = Office2007Colors.GetColorTable(Office2007Theme.Managed).FormBackground
Me.BackColor = backColor

Set the colorscheme as blue

Figure 1: ColorScheme is set as Blue

Set the colorscheme as black

Figure 2: ColorScheme is set as Black

Set the colorscheme as silver

Figure 3: ColorScheme is set as Silver

Set the colorscheme as managed

Figure 4: ColorScheme is set as Managed

Samples:

C#: http://www.syncfusion.com/downloads/support/directtrac/136405/ze/Office2007_ColorSceme-436592557

VB: http://www.syncfusion.com/downloads/support/directtrac/136405/ze/Office2007_ColorSceme_VB-262571768

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
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
Live Chat Icon