-
Notifications
You must be signed in to change notification settings - Fork 693
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
Lack of validation for XAML Style BasedOn & TargetType properties #2476
Comments
@mrlacey can you confirm if this issue repros in WinUI2.x? It sounds like from your issue this is WinUI3.0 only, but I just want to confirm. |
@stevenbrix Yes, the initial repro was for UWP (WinUI 2) With WinUI3 (preview 3), the same exception is still thrown but a better error message is included: Ideally it would still be better to see this issue at compile or design time. |
Thanks @mrlacey. I agree that the designer should provide a better error message here. Thanks for reporting this! @RealTommyKlein for FYI - it looks like we are missing some test cases here. |
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. |
keep open |
Describe the bug
There is no validation (in the designer/language service or at compile time) to confirm that a style is based on an appropriate type.
Without this check developers do not know what is wrong until running the app and experiencing a
XamlParseException
with very limited details.Steps to reproduce the bug
Steps to reproduce the behavior:
MainPage.xaml
Expected behavior
Screenshots
Version Info
NuGet package version:
This is a WinUI3 issue relating to code that's not public (yet?)
It is tied to the XAML language service as used within VS, not the shipping libraries
Additional context
This was originally reported to the XAML team but they claim it is not their issue.
The text was updated successfully, but these errors were encountered: