Articles in this section
Category / Section

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

3 mins read

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

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied