Open MartinZikmund opened 4 years ago
When this is implemented, the related Uno-specific TODO in BackdropMaterial.cs
needs to be removed (and replaced with the original WinUI implementation)
While initial support for ActualTheme
and ActualThemeChanged
is added in #6655, it will need further improvements when this is implemented. Specifically consider the following scenario:
RequestedTheme
MainPage.Loaded
a Border
is created. Its ActualTheme
should match application theme_border
, but do not add it to the visual tree.RequestedTheme
to Dark
_border
should still have ActualTheme
of Light
!_border
is added to the visual tree, its ActualTheme
will switch to Dark and ActualThemeChanged
is triggered.However - the following scenario should work as well:
RequestedTheme
MainPage.Loaded
a Border
is created. Its ActualTheme
should match application theme_border
, but do not add it to the visual tree.Dark
ActualThemeChanged
event is triggered automatically.ActualTheme
is queried, ActualThemeChanged
is triggered, and the new theme is Dark
ActualThemeChanged
event is triggered on theme change automatically only for elements which are part of the visual tree, others trigger it only when explicitly queried.
The changes in https://github.com/unoplatform/uno/pull/11983 have introduced DefaultTextForegroundThemeBrush
support, which also needs to adhere to the element-level theme!
When supported, native date and time pickers should follow the picker's actual theme instead of the application one See PRs for
@MartinZikmund you should consider Desktop apps too, it isn't in the platforms list.
What would you like to be added:
Support for:
FrameworkElement.RequestedTheme
FrameworkElement.ActualTheme
FrameworkElement.ActualThemeChanged
In case of WASM, we should ideally also apply
color-scheme
based on the actual theme of each elementAlso see the comments below for further requirements!
Why is this needed:
For full theming fidelity.
For which Platform:
Anything else we need to know?