LeftTwixWand / Inventory

New version of Microsoft Inventory sample, built on WinUI 3, using DDD and Clean Architecture approach
MIT License
71 stars 10 forks source link

Update ThemeSelectorService to use ThemeListener #20

Open LeftTwixWand opened 1 year ago

LeftTwixWand commented 1 year ago

Now the application toolbar is manually extended to match the Windows 11 style system. But every time the theme has changed, we have to apply the toolbar style manually: image

To avoid the code-behind, we can use the ThemeListener from the Community Toolkit to subscribe for the system theme change (if application theme is default) and handle it automatically in the separate service.