Posted 2 years ago by Ethem Acar
Version: 22.1.1
Avatar

I have 2 theme's registered. dark & light. Switching between those works great and everything adapts to the dark or light mood except my Label which should be darkgreen for light theme and lightgreen for dark theme. How can I do this?

Comments (2)

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

Hello,

In our Themes section of samples in the Sample Browser, please see the Theme Override QuickStart.  That sample shows how you can register XAML ResourceDictionaries on a per-theme basis, so you can put Styles or other Brush overrides in there.  Then they will be pulled in by our ThemeManager as theme changes occur.

In your case you could define a Style for Label and have one variation set for your Light theme and another variation set for your Dark theme.


Actipro Software Support

Posted 2 years ago by Ethem Acar
Avatar

Amazing how elegant and simple it works. Kudos.

The latest build of this product (v24.1.1) 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.