Posted 8 years ago by Stefan Koell
Version: 16.1.0633
Avatar

Hi,

the Metro Dark Theme has "Blue" colors for selection (selected tab, etc.). Is there a way to replace the blue with a different color? I found theme tinting but it's not really what I'm looking for. I want it to be Dark/Black but the selection color(s) should be different.

Thanks!

Stefan

Comments (6)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stefan,

Something like this in your app startup should work:

var tc = new TintedThemeCatalog("Custom", ThemeName.MetroDark.ToString(), Colors.Transparent);
tc.TintGroups.AddRange(TintGroupSets.State, Colors.Red);
ThemeManager.RegisterThemeCatalog(tc);
ThemeManager.CurrentTheme = "Custom";

Change the Red color to whatever you want.


Actipro Software Support

Posted 8 years ago by Stefan Koell
Avatar

Thanks for the sample! I can see now the hover items and selection items in this color. Is it also possible to change the "main" color of theme (not sure how I should call it, basically the "File" tab/backstage button in the ribbon and the blue font in the ribbon for the selected tabs, the window glow color, etc.)?

Regards,
Stefan

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stefan,

The state tint group there will alter all the brush resources defined with that state name.  But even on those that aren't part of that state, you can alter them either by tinting their group like:

tc.TintGroups.Add(new TintGroup(TintGroupNames.ApplicationButton, Colors.Red));

Or by overriding individual brushes in your application's Resources like:

<SolidColorBrush x:Key="{x:Static themes:AssetResourceKeys.RibbonTabItemForegroundSelectedBrushKey}" Color="#FF0097FB" />


Actipro Software Support

Posted 8 years ago by Stefan Koell
Avatar

Thanks, that helped a lot. I really like the way you can tweak colors. Very easy and straightforward! The only thing I'm not able to change is the Window glow color/border color. If I want to make it a different color using this:

tc.TintGroups.Add(new TintGroup(TintGroupNames.Window, Colors.Orange));

it also changes the color of the row with the ribbon tabs. Any way to set the border only without affecting anything else?

cheers,
Stefan

Posted 8 years ago by Stefan Koell
Avatar

I just found out that I can override the WindowBorderActiveBrushKey using this XAML:

            <SolidColorBrush x:Key="{x:Static apthemes:AssetResourceKeys.WindowBorderActiveBrushKey}" Color="#FFFFA500" />

 How would I do this in C# code?

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stefan,

You could do that in C# like this:

this.Resources.Add(AssetResourceKeys.WindowBorderActiveBrushKey, new SolidColorBrush(Colors.Red)); 

Where the "this" is the Application in Application.OnStartup. 

[Modified 8 years ago]


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.