Skip to content

Can I Change entire theme at a runtime, not just ThemeVariant? #17334

Answered by stevemonaco
shin0kaze asked this question in Q&A
Discussion options

You must be logged in to vote

IIRC, the ControlCatalog closes and recreates the Window when changing themes from Simple <-> Fluent. Probably applies the theme from code-behind, too. In practice of a well-designed app, changing themes is not as viable as one might think. Each theme is allowed to be opinionated about its control sizes, margins, and padding. eg. Fluent is way more spacious (even on Compact density) than Simple because it was built to be touch-friendly.

You must be careful applying any explicit positioning tweaks in your app views in one theme...because it probably won't look the same on all of them. You could create ResourceDictionarys that you swap that contains app view spacings for each theme per-dict…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shin0kaze
Comment options

Answer selected by shin0kaze
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