Many controls that support Office 2007 style allow you to specify an custom renderer to be used only for that instance of the control.

Using that you can customize the color table on per control basis when control is using Office 2007 style. In general following steps are needed to do that:

  • Instruct control to use custom renderer
  • Assign new instance of custom renderer to the control
  • Customize that custom renderer color table

Code below shows how to do that for a Bar control that you have on the form and which Style property is set to Office 2007:

C#

// Instruct bar to use custom renderer
 
bar1.RenderMode = DevComponents.DotNetBar.eRenderMode.Custom;
 
// Create custom renderer instance and assign it to bar
 
Office2007Renderer r = new Office2007Renderer();
 
bar1.Renderer = r;
 
// Customize colors
// Colors for stand-alone bars
 
r.ColorTable.LegacyColors.BarBackground = Color.Orange;
r.ColorTable.LegacyColors.BarBackground2 = Color.Yellow;
 
// For bars part of DotNetBarManager ...
 
r.ColorTable.Bar.ToolbarTopBackground.Start = Color.Yellow;
r.ColorTable.Bar.ToolbarTopBackground.End = Color.Orange;
r.ColorTable.Bar.ToolbarBottomBackground.Start = Color.Green;
r.ColorTable.Bar.ToolbarBottomBackground.End = Color.Yellow;

VB

' Instruct bar to use custom renderer

bar1.RenderMode = DevComponents.DotNetBar.eRenderMode.Custom
 
' Create custom renderer instance and assign it to bar

Dim r As Office2007Renderer = new Office2007Renderer()
 
bar1.Renderer = r
 
' Customize colors
' Colors for stand-alone bars

r.ColorTable.LegacyColors.BarBackground = Color.Orange
r.ColorTable.LegacyColors.BarBackground2 = Color.Yellow
 
' For bars part of DotNetBarManager ...

r.ColorTable.Bar.ToolbarTopBackground.Start = Color.Yellow
r.ColorTable.Bar.ToolbarTopBackground.End = Color.Orange
r.ColorTable.Bar.ToolbarBottomBackground.Start = Color.Green
r.ColorTable.Bar.ToolbarBottomBackground.End = Color.Yellow

Related posts:

  1. How To Customize Office 2007 Color Table
  2. How to Access Office 2007 Color Table
  3. How to Customize DateTimeInput, DoubleInput, IntegerInput and TextBoxX colors
  4. Changing NavigationPane Color Scheme
  5. How to change & apply Ribbon Color Table