Using TintedThemeCatalog with custom DictionaryReferences

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 7 years ago by Detlef Peters - Software Architect, MID GmbH
Version: 11.2.0552
Avatar

Hi Actipro Team,

I am trying to use the custom DictionaryReferences from the "CustomDockingThemeCatalog" sample, combined with a tinted ApplicationButton, like in the "Tinting" sample. Unfortunately, I had no luck in getting both effects together:

- When I register more than one ThemeCatalog, my application hangs when switching the theme

- When I derive my CustomThemeCatalog from TintedThemeCatalog and override the DictionaryReferences property, as in your sample code, calling the 'TintGroups.AddRange(TintGroupSets.ApplicationMenu, Colors.Red)' function has no effect, and the ApplicationButton stays blue.

So, what do have to do to get both effects combined?

Best Regards,

  Detlef

Comments (4)

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

Hi Detlef,

For issues like this that require us to see what you are doing, please always make a new simple sample project and email it to our support address.  Please rename the .zip file extension so it doesn't get spam blocked.  Then we can debug your project and if code changes are necessary, we can ensure that they fix the problem.  Or we can tell you how to change your code to get it working.


Actipro Software Support

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

Hi Detlef,

Thanks for the sample. There were basically two problems I saw:

1) You were registering both theme catalogs using the same key "Custom". They need to be different or else one won't take effect.

2) You have to flip the order they are registered. I believe the one with the app button redefines all the brushes you are redefining in the CustomizedThemeCatalog, so if the app button one comes last then you end up ignoring all of CustomizedThemeCatalog.

This was the code I had that seemed to work:

TintedThemeCatalog catalog2 = new TintedThemeCatalog();
catalog2.TintGroups.AddRange(TintGroupSets.ApplicationMenu, System.Windows.Media.Color.FromRgb(227, 28, 24));
ThemeManager.RegisterThemeCatalog("Custom2", catalog2);

CustomizedThemeCatalog catalog = new CustomizedThemeCatalog();
ThemeManager.RegisterThemeCatalog("Custom", catalog);


Actipro Software Support

Answer - Posted 7 years ago by Detlef Peters - Software Architect, MID GmbH
Avatar

Hi again,

thanks a lot. This indeed solved my problem :-)

I have one question left regarding your alternative themes:

Was it really intended to eliminate the yellowish color (in Office themes) of active document tabs? OfficeBlack still has a clear indication which document is active by using this yellowish highlight. The alternative OfficeBlue and Silver use this effect only for tool windows, but no longer for document windows.

How can I get this effect back without loosing the (indeed more more attractive) docking style?

Thanks in advance,

  Detlef

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

Hi Detlef,

The samples with alternate themes use colors that are very similar to what we had in prior versions like 2011.1.  The yellowish highlight for document tabs is new in the 2011.2 Docking themes.

If you look at the alternative theme sample's XAML files, you can see we simply included various asset overrides there.  If you remove any of those, they will fall back to the newer 2011.2 look.  So you can remove (or change) the ones for document tabs as needed to get the look you desire.

Our theme system in 2011.2 is intended to make everything extremely easy to customize to meet any needs.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 13 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.