-
Notifications
You must be signed in to change notification settings - Fork 677
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
WinUI 3 in desktop: XAML parsing failed #5714
Comments
@yv73 does the _FontSizes.xaml file contain only one resource, LargeFontSize? If so can you try adding a second resource to that dictionary and see if the issue still occurs? there is an optimization for resource dictionaries with only one entry which has bitten us in the past, I wonder if that is causing this. |
_FontSizes.xaml is generated with Windows Template Studio (App (WinUI 3 in Desktop)):
To set TextBox.xaml:
Observe exception at runtime: 'XAML parsing failed.' No problem if I use
TextStyleLargeFontSize is from .nuget\packages\microsoft.projectreunion.winui\0.8.2\lib\net5.0-windows10.0.18362.0\Microsoft.WinUI\Themes\generic.xaml
And LargeFontSize is used in TextBlock.xaml (generated with WTS) without problem:
Using LargeFontSize directly in MainPage.xaml:
is no problem too. |
@yv73 I can't reproduce the issue based on the step you've provided. Following them everything works fine for me. Based on other information above, I suspect there may be more going on than is documented. Because:
If you have a minimal project that shows this, can you zip it up and share it? |
I updated Project Reunion package to version 0.8.2. With 0.8.0 same behavior. |
Have you reproduced the issue? |
@RealTommyKlein and @fabiant3 FYI |
I believe the TextBlock.xaml:
TextBox.xaml:
|
Yes, it works for me too. However, |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Windows 10 Pro 10.0.19043
Microsoft Visual Studio Community 2019 Version 16.11.1
Steps to reproduce:
File, New, App (WinUI 3 in desktop)
WTS.ProjectConfig.xml:
Add, New Item ... Resource Dictionary (WinUI 3) TextBox.xaml
Make the modifications to TextBox.xaml:
LargeFontSize is from /Styles/_FontSizes.xaml:
<x:Double x:Key="LargeFontSize">24</x:Double>
Make the modifications to App.xaml:
Build / execute
Observe exception at runtime: 'XAML parsing failed.'
"Cannot find a Resource with the Name/Key LargeFontSize [Line: 13 Position: 37]"
Is there something wrong?
The text was updated successfully, but these errors were encountered: