Skip to content

x:Bind to ActualTheme does not update when the control's theme actually changes #10390

@HO-COOH

Description

@HO-COOH

Describe the bug

Continue from #10389 , when x:Bind to a UserControl.ActualTheme actually compiles, it does not trigger update when the theme actually changes.

Steps to reproduce the bug

  1. Create a new C++ project
  2. Create a new UserControl called MyControl
  3. Use this xaml
    <StackPanel>
        <local:MyControl x:Name="MyControl" />
        <TextBlock Text="{x:Bind local:MyPage.ElementThemeToString(MyControl.ActualTheme), Mode=OneWay}" />
    </StackPanel>
  1. Build and run, switch theme in windows settings, the text is not updated.

Expected behavior

No response

Screenshots

Image

NuGet package version

None

Windows version

No response

Additional context

Repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue needs to be triaged by the area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions