-
Notifications
You must be signed in to change notification settings - Fork 705
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
Question: Can I declare a conditional XAML static resource? #2861
Comments
@harvinders Does the XAML parsing error sound like the one in #2556? Or is a different error text? |
Can you show the xaml where you reference this resource as well? Also can you copy the full error you are seeing into this issue as well? |
@StephenLPeters Please find the repo at https://github.com/harvinders/ShadowTestApp When run on the 1803 we get the error Windows.UI.Xaml.Markup.XamlParseException
|
@alwu-msft FYI |
@harvinders You're not doing anything wrong; this looks like a bug in how single-item ResourceDictionaries interact with conditional XAML. As a workaround, could you try adding a second item into that ResourceDictionary? It doesn't have to be used anywhere; what's important is that the ResourceDictionary contains at least two items in it. |
@alwu-msft the work around worked. |
There are several issues related to conditional XAML, #2556 is definitely in the same category of issues. @StephenLPeters |
@robloo As one of the maintainers of the XamlCompiler toolchain (specifically, the parser), I suspect I share many of your frustrations. At the moment we are focused entirely on shipping WinUI 3.0 (which, unfortunately, is not likely to fundamentally change how we process XAML markup) but modernizing the architecture of XamlCompiler is very much something we want to tackle in the future; we have several ideas about how to go about doing this but they do have to be balanced with other competing priorities. |
@alwu-msft Thanks for your response. I understand we all have to prioritize our time. It's encouraging to hear this has been discussed internally and is something that might be tackled in the future. |
I have a app with conditional ThemeShadow, it works fine with 1903+ however on 1803 it crashes. It complaints that there is a XAML parsing error.
Is there a workaround? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered: