visual studio designer theme

Nov 19, 2013 at 10:07 PM
is there any way to change the default theme that is shown in the designer? i have created a custom theme that i would like to preview in the designer, not only at runtime.
Nov 23, 2013 at 11:41 AM
You can modify it directly at the source code.
The initial colors of each part are defined in this class:


which is currently located at:

Classes\Renderer\Color Tables\RibbonProfesionalRendererColorTable.cs
Nov 23, 2013 at 1:10 PM
Edited Nov 23, 2013 at 1:11 PM
yes, but when you choose the ThemeColor from within the design mode properties (black, halloween, etc.), nothing happens. the default theme remains even after rebuilding. this is with visual studio 2012, .net framework 4.0.
Nov 26, 2013 at 7:04 AM
try this:
void ChangeToBlackTheme()
    Theme.ColorTable = new RibbonProfesionalRendererColorTableBlack();

void ChangeToPurpleTheme()
    Theme.ColorTable = new RibbonProfesionalRendererColorTablePurple();

void ChangeTheRibbonBackgroundOnly(System.Drawing.Color color)
    Theme.ColorTable.RibbonBackground = color;
Nov 26, 2013 at 11:02 AM
Edited Nov 26, 2013 at 3:41 PM
the colors won't get applied when in designer mode because of the fix put in for things 'blowing up'

in Theme.cs in the ThemeColor property:
                Theme.blnSetOnly = true;
                Theme.ThemeColor = value;
                Theme.blnSetOnly = false;
that flag causes the designer to never update it's colors, because in Theme.cs in the ThemeColor property:
if (blnSetOnly == false) {
blnSetOnly is always true in designer mode, apparently. after removing the flag, everything appears to work as expected (changing the theme, changes the colors in design mode)

this flag is also set around changing the ThemeStyle but it's not actually checked when the style is changed, so i wonder if it's still necessary when changing the theme's color.

Edit: however doing so, apparently breaks setting custom themes at runtime.
Edit2: disregard the previous edit, i was trying to change the theme in the main form's constructor. it seems to work ok.