Add new AssetKey to existing themes

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 2 years ago by Hagay
Version: 17.2.0664
Avatar

Hi,

I'm using both Metro-White and Metro-Dark themes in my application (I let the user choose between them dynamically).

I would like to set a new Asset that will be used by the AdvancedTextBlock.HighlightBackground property and will change according to the selected theme.

What is the right and easy way to accomplish that?

Thanks!

Comments (1)

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

Hi Hagay,

Yes you can set the AdvancedTextBlock.HighlightBackground property to a Brush resource you create.  The brush resource could be put in XAML files that get pulled in from a custom theme catalog that you create.  The ThemeSamples\ThemeOverride QuickStart in the Sample Browser shows an example of how to pull in different Brush resource values based on theme.  Please have a look at that.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) 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.