Open
Description
Describe the bug
Some of our samples (like ListDetailsView) use custom theme resources {ThemeResource Brush-Blue-01}
which cause problems if copied blindly. Any resources defined or used should be part of the sample XAML or we should only use system level resources that are part of OS/WinUI 2.x.
Steps to Reproduce
- Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)
Steps to reproduce the behavior:
- Copy ListDetailsView sample XAML into a new app...
- Run, get an exception in MeasureOverride because theme resource is missing
Expected behavior
Easy to copy example and make work in an app.
Environment
NuGet Package(s):
Package Version(s):
Windows 10 Build Number:
- Fall Creators Update (16299)
- April 2018 Update (17134)
- October 2018 Update (17763)
- May 2019 Update (18362)
- 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)
- May 2019 Update (18362)
- May 2020 Update (19041)
- Insider Build ({build_number})
Device form factor:
- Desktop
- Xbox
- Surface Hub
- IoT
Visual Studio version:
- 2017 (15.{minor_version})
- 2019 (16.{minor_version})
- 2022 (17.{minor_version})
Additional context
This is something probably for us to keep in mind as we re-work samples in the future.