Tinting of the Tab of the Docking Control

Docking/MDI for WPF Forum

Posted 9 years ago by matt2012
Version: 15.1.0624
Platform: .NET 4.5
Environment: Windows 7 (64-bit)
Avatar

Hello,

I use the Metro Light theme and tint it with green:

ThemeManager.BeginUpdate();

ThemesMetroThemeCatalogRegistrar.Register();
Color hks52 = Color.FromArgb(255, 0, 133, 120); //green Color
ThemeManager.RegisterThemeCatalog(new TintedThemeCatalog("MyTheme", ThemeName.MetroLight.ToString(), hks52));
ThemeManager.CurrentTheme = "MyTheme";
ThemeManager.AreNativeThemesEnabled = true;
ThemeManager.EndUpdate();

 

All work fine, but the active Tab of the DocumentHost has still the color blue.

When the document host don't have the focus. The tab color is ok (then it's light green).

Also the move over color for the tab is green.

What is here the problem?

How can I fix this?

Thank you for your answer.

[Modified 9 years ago]

Comments (2)

Answer - Posted 9 years ago by matt2012
Avatar

In works with a additional line:

 

ThemeManager.BeginUpdate();
ThemesMetroThemeCatalogRegistrar.Register();
Color hks52 = Color.FromArgb(255, 0, 133, 120);
var myThemeCatalog = new TintedThemeCatalog("MyTheme", ThemeName.MetroLight.ToString(), hks52);
myThemeCatalog.TintGroups.AddRange(TintGroupSets.All, hks52); //additional line
ThemeManager.RegisterThemeCatalog(myThemeCatalog);
ThemeManager.CurrentTheme = "MyTheme";
ThemeManager.AreNativeThemesEnabled = true;
ThemeManager.EndUpdate();
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Yes, I believe that brush is designed to be excluded from tinting, along with other state-related brushes.  While you could do what you did, that will tint all the state brushes in UI which could be a negative side effect.

If you only want to affect the one, you could override the AssetResourceKeys.TabbedMdiContainerTabItemBackgroundActiveSelectedBrushKey resource brush at any time in your App's Resources.


Actipro Software Support

The latest build of this product (v24.1.3) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.