How to customize the appearance of the WinForms MainFrameBarManager with custom colors?
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.
“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
Figure 1: ColorScheme is set as Blue
Figure 2: ColorScheme is set as Black
Figure 3: ColorScheme is set as Silver
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