microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.27k stars 674 forks source link

Bug: AnimatedVisualPlayer inherits theme from app.xaml #7364

Open yaira2 opened 2 years ago

yaira2 commented 2 years ago

Describe the bug

I found an issue where the AnimatedVisualPlayer control is inheriting its theme from app.xaml instead of the local page. This causes issues when trying to use a theme resource.

Steps to reproduce the bug

  1. Set the requested theme in app.xaml to dark.
  2. Set the requested theme on MainPage.xaml to light
  3. Add a theme dictionary with a different URI source for light and dark mode
  4. Set the AnimatedVisualPlayer source to the ThemeResource and notice how it's using the dark mode resource

Expected behavior

The control should use the correct theme resource.

Screenshots

No response

NuGet package version

No response

Windows app type

Device form factor

Desktop

Windows version

Windows 11 (21H2): Build 22000

Additional context

No response

yaira2 commented 1 year ago

Are there any updates on this issue?

DmitriyKomin commented 9 months ago

@yaira2 : Can you please attach a simple repro sample with WinAppSDK?

yaira2 commented 9 months ago

I haven't tested in WinUI 3, this issue is with WinUI 2. Do you want a WinUI 2 sample, or alternatively you can just follow the repro steps for this one.

DmitriyKomin commented 9 months ago

Hey @yaira2, at this time we're focusing on WinUI3 issues only (more on that here), so a WinUI2 repro would not be directly useful. If creating a WinAppSDK repro would be time-consuming, please go ahead and post the WinUI2 repro (and we'll map that to a WinUi3 app).

Side note: unfortunately, the policy linked above also means that any potential fix here will be limited to WinAppSDK.

yaira2 commented 9 months ago

Understood, unfortunately the codebase is stuck on WinUI 2 for now but it would still be good if you can fix for WinUI 3.

DmitriyKomin commented 9 months ago

@yaira2, a WinUI2 repro would still be good to clarify the situation, would you be able to share that?

yaira2 commented 8 months ago

I'm fairly sure this applies to WinUI 3 as well, but it's a little hard to put together a repro if a potential fix isn't going to be backported.