Describe the bug
ThemeListener seems to do nothing in WinAppSDK apps. A comment in a related issue points out that the events ThemeListener relies on are no longer supported in WinUI 3.
Steps to Reproduce
Steps to reproduce the behavior:
Place the following code anywhere inside a WinAppSDK 1.0.0 C# app:
private void ThemeChanged(ThemeListener sender)
{
ApplicationTheme theme = sender.CurrentTheme;
Debug.WriteLine(theme);
}
ThemeListener themeListener = new();
themeListener.ThemeChanged += ThemeChanged;
Observe that the ThemeChanged handler is never fired.
Expected behavior
The ThemeChanged event should fire when the system theme is changed.
Environment
NuGet Package(s): CommunityToolkit.WinUI.UI
Package Version(s): 7.1.2
Windows 10 Build Number:
App min and target version:
Device form factor:
Visual Studio version:
Describe the bug
ThemeListenerseems to do nothing in WinAppSDK apps. A comment in a related issue points out that the eventsThemeListenerrelies on are no longer supported in WinUI 3.7.1.2 for UWP
Steps to Reproduce
Steps to reproduce the behavior:
Place the following code anywhere inside a WinAppSDK 1.0.0 C# app:
Observe that the
ThemeChangedhandler is never fired.Expected behavior
The
ThemeChangedevent should fire when the system theme is changed.Environment
NuGet Package(s): CommunityToolkit.WinUI.UI
Package Version(s): 7.1.2
Windows 10 Build Number:
App min and target version:
Device form factor:
Visual Studio version: