Open mrlacey opened 4 years ago
@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:
Can only base on a Style with target type that is base type of this style's target type.
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.