Posted 7 months 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 7 months 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 7 months ago by Ethem Acar
Avatar

Amazing how elegant and simple it works. Kudos.

The latest build of this product (v22.1.4) was released 23 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.