Is it possible to override a Brush Key for one theme only?

WPF Studio, Themes, and Shared Library for WPF Forum

The latest build of this product (v25.1.1) was released 2 months ago, which was before this thread was created.
Posted 4 days ago by Alex George - CNC Software
Version: 25.1.1
Avatar

Hello,
We are overriding some brush keys in our app to improve readability of checked buttons. For example the ToolBarButtonBackgroundCheckedNormalBrushKey is a very light gray and does not stand out well against its background typically, we override this brush to a light blue color so that there is more contrast against non-checked buttons.

This works great for Light theme but in a Dark theme our override is too bright and our white icons are difficult to see. Is there a simple/straightforward way to specify an override per theme (e.g. not override this color for Dark theme, only Light)? Or do we need to go down the route of generating completely new custom themes to have this capability? Any advice would be great.

thank you
Alex George

Comments (2)

Answer - Posted 3 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Alex,

Yes, please see our ThemeSamples/QuickStart/ThemeOverride sample in the samples app.  That shows how you can register a custom theme catalog and can create resource dictionaries for specific themes that have tailored brush overrides.  This is the same concept you are looking for.


Actipro Software Support

Posted 3 days ago by Alex George - CNC Software
Avatar

perfect, thank you

Add Comment

Please log in to a validated account to post comments.