Skip to content
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

Grid RowDefinitions/ColumnDefinitions not recognized by VS2022 #6370

Open
1 of 2 tasks
asklar opened this issue Nov 23, 2021 · 5 comments
Open
1 of 2 tasks

Grid RowDefinitions/ColumnDefinitions not recognized by VS2022 #6370

asklar opened this issue Nov 23, 2021 · 5 comments
Labels
area-Tooling bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@asklar
Copy link
Member

asklar commented Nov 23, 2021

Describe the bug

1st problem is that VS doesn't understand what RowDefinitions (or ColumnDefinitions) means and shows a squiggly - even though it works at runtime

Steps to reproduce the bug

<Grid RowDefinitions="123,*">
...
</Grid>

Expected behavior

Screenshots

image

NuGet package version

WinUI 3 - Windows App SDK 1.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)

Windows app type

  • UWP
  • Win32

Device form factor

image

Windows version

Insider Build (xxxxx)

Additional context

No response

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Nov 23, 2021
@StephenLPeters StephenLPeters added area-Tooling team-Markup Issue for the Markup team labels Feb 16, 2022
@StephenLPeters
Copy link
Contributor

@evelynwu-msft FYI

@HEIC-to-JPEG-Dev
Copy link

This means that there is effectively no visual editor for WinUI if you use this XAML as VS doesn't have one, and live edit doesn't work as it doesn't recognise the XAML if any part is modified.

@evelynwu-msft evelynwu-msft added bug Something isn't working product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners labels Oct 14, 2022
@evelynwu-msft
Copy link
Contributor

Sort of related to #5944.

@ettiennehugo
Copy link

Just FYI, I did get this issue and it is actually due to something else broken in your XAML. To fix it, define the RowDefinitions attribute using the Grid.RowDefinitions/RowDefinition tags - fixing this "error" will expose the other error in your XAML. Once the other error is fixed you can revert to using the RowDefinitions attribute.

This is still an issue though with the XAML parser highligting the wrong error.

@HEIC-to-JPEG-Dev
Copy link

Just FYI, I did get this issue and it is actually due to something else broken in your XAML. To fix it, define the RowDefinitions attribute using the Grid.RowDefinitions/RowDefinition tags - fixing this "error" will expose the other error in your XAML. Once the other error is fixed you can revert to using the RowDefinitions attribute.

This is still an issue though with the XAML parser highligting the wrong error.

I disagree. The XAML works perfectly and there are no errors. Making a simple change, like adding a space or changing a value causes this error. Using the long-form XAML and making the same change does not cause this (or any other) error. Therefore the live XAML editor is at fault and needs to be fixed - what's the point of a live XAML editor that doesn't work (unless you replace simple XMAL with lots of lines of XAML; can you imaging saying that to C# & .Net 8 - "Oh yes a the feature to remove 10 lines of boilerplate code is amazing, but if you use it, the IDE will show errors until you re-compile & run the app")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tooling bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

5 participants