microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
Simplified inline syntax for RowDefinitions/ColumnDefinitions breaks XAML Hot Reload
Describe the bug When using the simplified inline syntax for specifying RowDefinitions or ColumnDefinitions, XAML Hot Reload does not work. (WinUI 3 with C#/XAML)
Steps to reproduce the bug
- Use the simplified inline syntax in a WinUI3 project (e.g.
<Grid RowDefinitions="Auto,*">
) - Start debugging the app.
- Change some XAML
- The change is not reflected in the running app.
Expected behavior XAML Hot Reload should work with this XAML syntax.
Version Info NuGet package version: WinUI 3 - Windows App SDK 0.8: 0.8.3
Windows app type:
UWP | Win32 |
---|---|
N/A | Yes |
Windows version | Saw the problem? |
---|---|
May 2021 Update (19043) | Yes |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
I have the same issue with WinUI 3 - Windows App SDK 1.0 Preview.
Does not work:
<Grid RowDefinitions="Auto,*" >
Works:
<Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions>
Took me some time to find out what was the issue in my App, but I can confirm this issue (for my android build + net7.0).
I wonder two things:
- It has worked in the past for me (only few version before RC1)
- This issue now already is one year old and no fix in sight?
Still have this problem using Windows App SDK v1.2.230118.102
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")
The fact that issues like this are still open 3 years later is....something. Can the WinUI team please implement some kind of sensible triaging system where fundamental usability issues are prioritized and addressed? It feels like the team is focused on adding more features on top of a broken platform in every release instead of fixing any of the basic problems with the platform.
I started getting suspicious of the development path when they stated they want to keep the issue count under 2,000 issues - and to achieve that, they weren’t going to fix the issues, they were going to close them.