Skip to content

Style Selector for Theme #5490

Discussion options

You must be logged in to vote

There is no any build-in selectors for themes, because Avalonia doesn't have proper theming feature yet (it's only possible to swap resource dictionaries and styles).

But personally I would create some global class that reads styles from App and check for FluentTheme.Mode, and also subscribes on styles collection changes to recalculate value. To bind it with windows "mixin" can be used - https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Controls/Mixins/PressedMixin.cs.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@maxkatz6
Comment options

@workgroupengineering
Comment options

Answer selected by workgroupengineering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants