Skip to content

WinUI 3: ThemeListener crashes #3656

Open
@ocalvo

Description

@ocalvo

Describe the bug

Creating ThemeListener crashes

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

  • Can this be reproduced in the Sample App? Yes

Steps to reproduce the behavior:

  1. Create a new WinUI3 Desktop app using version latest internal version on WinUI3
  2. Add a reference to WCT preview 3:
3. Write this code in App.xaml.cs:
  protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
  {
     var t = new Microsoft.Toolkit.Uwp.UI.Helpers.ThemeListener();
  1. F5

Expected behavior

App does not crash.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

NuGet Package(s): 
8.0.0-preview3

Package Version(s): 
WinUI3 latest internal version

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] May 2020 Update (19041)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [x] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [ ] 2019 (version: ) 
- [x] 2019 Preview (version: 2)

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    WinUI 💠Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3.bug 🐛An unexpected issue that highlights incorrect behaviorexternal ⤴️Requires an update to an external dependency or due to code outside the Toolkit.sdkcheck 🏁

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions