Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ThemeListener? And/or refactor? #135

Open
michael-hawker opened this issue Jul 11, 2023 · 2 comments · May be fixed by #445
Open

Remove ThemeListener? And/or refactor? #135

michael-hawker opened this issue Jul 11, 2023 · 2 comments · May be fixed by #445
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@michael-hawker
Copy link
Member

michael-hawker commented Jul 11, 2023

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)

@michael-hawker michael-hawker added the enhancement New feature or request label Jul 11, 2023
@michael-hawker michael-hawker moved this to 🆕 New in Toolkit 8.x Jul 11, 2023
@michael-hawker michael-hawker added the good first issue Good for newcomers label Jul 11, 2023
@Jay-o-Way
Copy link

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

@HO-COOH HO-COOH linked a pull request Jun 29, 2024 that will close this issue
6 tasks
@Jay-o-Way
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

3 participants