Skip to content

Remove ThemeListener? And/or refactor? #135

Open

Description

@michael-hawker

ThemeListener doesn't work in the Windows App SDK at the moment, so thinking we should remove it for now until it's supported in the WASDK?

In either case, we should refactor to remove the call to EnqueueAsync for the DispatcherQueue Extensions so we don't need the Helper package to depend on the Extensions package. I think that's the only call there:

return DispatcherQueue.EnqueueAsync(
() =>
{
// TODO: This doesn't stop the multiple calls if we're in our faked 'White' HighContrast Mode below.
if (CurrentTheme != Application.Current.RequestedTheme ||
IsHighContrast != _accessible.HighContrast)
{
#if DEBUG
global::System.Diagnostics.Debug.WriteLine("Color Values Changed");
#endif
UpdateProperties();
}
}, DispatcherQueuePriority.Normal);

Seems to be the only use of the Extensions I believe in this project. (which also means the Collections package is pulling them in as they depend on the Helpers)

Activity

  1. Jay-o-Way commented on Dec 14, 2023

    @Jay-o-Way

    Is themelistener still needed? I thought things like this got more and more built in...

  2. Jay-o-Way commented on Jul 14, 2024

    @Jay-o-Way

    Again: could it be that something is blocking the basic functionality? (things like) Theme adaptation should be as native as possible and I am convinced there's no need for a complex solution.

  3. added
    components::helpersHelpers for Colors, Network, Camera, WeakEventListener, PackageVersion, ScreenUnit and more.
    on Aug 7, 2025
  4. moved this from 🆕 New to 📋 Backlog in Toolkit 8.xon Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

components::helpersHelpers for Colors, Network, Camera, WeakEventListener, PackageVersion, ScreenUnit and more.enhancementNew feature or requestgood first issueGood for newcomers

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions