Open morning4coffe-dev opened 3 months ago
@kazo0 to verify if it is a duplicate: https://github.com/unoplatform/uno.csharpmarkup/issues/716
@agneszitte yes this is the same issue as https://github.com/unoplatform/uno.csharpmarkup/issues/716
To work around this issue, you can create a Style
targeting Page
, with a setter for the Background
(using ThemeResource
in the Setter
) - theme resources should be correctly applied and observed when part of Style
, and this should work across all targets including WinUI
Workaround similar to https://github.com/microsoft/microsoft-ui-xaml/issues/9464#issuecomment-2258432746
Changing the theme manually with a ToggleSwitch inside the app results in the app not updating its background on Windows and on other platforms, the color is too dark when in DarkTheme.
Tested on my side on
"Uno.Sdk": "5.2.175"
Repro with my notes: https://github.com/morning4coffe-dev/uno-platform-testing/tree/bug/mvux-csm-fluent-theme-resource-update
Then testing the same case in XAML+MVVM project, I am not able to repro this issue.
Originally posted by @kucint in https://github.com/unoplatform/uno/discussions/17487:
Changing Theme to dark and back to light works fine on
Desktop
. OnWindows
, controls seem to react correctly on change, except the main frame background which stays always light.Model: