uno icon indicating copy to clipboard operation
uno copied to clipboard

fix: Generate UXAML0001 error for invalid property values with valid C# fallback

Open Copilot opened this issue 1 month ago β€’ 20 comments

GitHub Issue: closes #21935

PR Type:

🐞 Bugfix

What is the current behavior? πŸ€”

Using invalid values like Margin="auto,0,0,0" in XAML generates CS0103: The name 'auto' does not exist in the current context in generated code. The error points to the generated C# file instead of the XAML source, making it difficult for developers to understand and fix the issue. Additionally, the invalid generated code prevents successful compilation.

What is the new behavior? πŸš€

The XAML generator now validates property values and produces proper UXAML0001 diagnostics pointing to the correct location in the XAML file when an invalid value is detected. Instead of throwing exceptions that cause invalid C# generation, the generator uses AddError() to report errors while generating valid default values, allowing compilation to continue and all XAML errors to be shown at once.

Validated property types:

  • Thickness (Margin, Padding, etc.): Validates each component is a valid number, generates new Thickness(0) on error
  • CornerRadius: Validates each component is a valid number, generates new CornerRadius(0) on error
  • GridLength (RowDefinition.Height, ColumnDefinition.Width): Validates the value can be parsed, generates new GridLength(0f, Pixel) on error
  • Double/Single: Validates the value is a valid number, generates 0d or 0f on error
  • Vector2, Vector3, Point, Size, Matrix: Validates each component is a valid number via SplitAndJoin, generates "0, 0" on error

Example:

<Grid Margin="auto,0,0,0">
</Grid>

Now produces: UXAML0001: Invalid Thickness value 'auto,0,0,0'. Each component must be a valid number while generating new Thickness(0) to ensure valid C# code.

Changes:

  • Added validation in XamlFileGenerator.BuildThickness() for Thickness values (changed to non-static to access AddError)
  • Added validation in XamlFileGenerator.BuildCornerRadius() for CornerRadius values (changed to non-static to access AddError)
  • Added validation in XamlFileGenerator.BuildGridLength() for GridLength values (changed to non-static to access AddError)
  • Added validation in XamlFileGenerator.GetFloatingPointLiteral() for Double/Single values
  • Added validation in XamlFileGenerator.SplitAndJoin() for Vector2, Vector3, Point, Size, Matrix types
  • Replaced all throw new XamlGenerationException() with AddError() calls to allow continued code generation with default values
  • Added tests: When_Invalid_Margin_Value, When_Invalid_CornerRadius_Value, When_Invalid_GridLength_Value, When_Invalid_Double_Value, When_Invalid_Point_Value

PR Checklist βœ…

Please check if your PR fulfills the following requirements:

Other information ℹ️

  • Tests added to Given_Parser.cs in Uno.UI.SourceGenerators.Tests, positioned right after the When_Invalid_Object_Property test for logical grouping of invalid XAML value tests.
  • The validation uses double.TryParse() to check component values before generating code.
  • For GridLength and floating point types, validation is only performed when an owner (XamlMemberDefinition) is available to ensure backward compatibility with internal calls.
  • Integer types (Int32, Int64, Int16, Byte) are intentionally not validated as they have special parsing behavior (e.g., Int32 ignores content after spaces).
  • Error reporting uses AddError() instead of throwing exceptions to ensure valid C# code is always generated, preventing CS0103 compilation errors while still reporting UXAML0001 diagnostics at the correct XAML locations.
Original prompt

This section details on the original issue you should resolve

<issue_title>[xaml-gen] CS0103 with invalid XAML</issue_title> <issue_description>### What would you like to be added? πŸ’‘

When adding Margin="auto,0,0,0" we get error CS0103: The name 'auto' does not exist in the current context in gen'ed code. We should get a XAML0001 at the right location in the XAML

Why is this needed? πŸ€”

To improve dev experience

Renderer 🎨

  • [ ] Skia
  • [ ] Native

For which platforms πŸ“±πŸ’»πŸ–₯️

No response

Anything else we need to know? πŸ’¬

No response</issue_description>

<agent_instructions>On the model of test When_Invalid_Object_Property, create test in file https://github.com/unoplatform/uno/blob/master/src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_Parser.cs that repro this failure when Margin="auto,0,0,0"</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@carldebilly @dr1rrb I saw it this morning on my side, so that's definitely something the model likes to generate. What do you think should be the right fix for that? What should be the correct correction to it? Because the actual _intention_ is unclear, nor the right fix.
  • Fixes unoplatform/uno#21935

πŸ’¬ We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot avatar Nov 26 '25 18:11 Copilot

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: dr1rrb
:x: Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 26 '25 18:11 CLAassistant

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 26 '25 18:11 CLAassistant

πŸ€– Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21976/wasm-skia-net9/index.html

unodevops avatar Nov 26 '25 18:11 unodevops

@copilot Please move it to line 309, right after the When_Invalid_Object_Property test

dr1rrb avatar Nov 26 '25 20:11 dr1rrb

@copilot Please move it to line 309, right after the When_Invalid_Object_Property test

Done in d88ccacd - moved the test to line 310, right after When_Invalid_Object_Property.

Copilot avatar Nov 26 '25 20:11 Copilot

@copilot src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_Parser.cs:335

This should be DiagnosticResult.CompilerError("UXAML0001"), please adjust the test and make adjustemnts in the XAMLFileGenerator to support this case

dr1rrb avatar Nov 26 '25 20:11 dr1rrb

@copilot src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_Parser.cs:335

This should be DiagnosticResult.CompilerError("UXAML0001"), please adjust the test and make ad...

Done in 4c7c4df3 - Updated the test to expect UXAML0001 and added validation in XamlFileGenerator.BuildThickness() to check that each Thickness component is a valid number. The method now throws a XamlGenerationException with a descriptive message when an invalid value like auto is used.

[!WARNING]

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 7tjvsblobprodcus341.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • m8dvsblobprodcus37.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • pdfvsblobprodcus380.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • u3hvsblobprodcus371.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot avatar Nov 26 '25 21:11 Copilot

@copilot Good πŸ‘

Please do the same for:

  • CornerRadius: src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs:5334
  • GridLength: src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs:5167
  • All numerics type: src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs:4996

Add tests for all of those cases

dr1rrb avatar Nov 26 '25 21:11 dr1rrb

@copilot Good πŸ‘

Please do the same for:...

Done in 70e2cefe - Added validation for:

  • CornerRadius: BuildCornerRadius() now validates each component
  • GridLength: BuildGridLength() now catches parsing errors
  • Numeric types: Added validation for Int32, Int64, Int16, Byte in switch cases, and Double/Single in GetFloatingPointLiteral()

Added tests:

  • When_Invalid_CornerRadius_Value
  • When_Invalid_GridLength_Value
  • When_Invalid_Double_Value
  • When_Invalid_Int32_Value

Copilot avatar Nov 26 '25 21:11 Copilot

@copilot src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs:4803-4822

Non, dΓ©fait Γ§a, le commenatire dit clairement que y'a un cas particulier pour Int32, remet return IgnoreStartingFromFirstSpaceIgnoreLeading(GetMemberValue());

Par contre tu n'a pas changΓ© le SplitAndJoin qui est utilisΓ© par System.Numerics.Vector2 et System.Numerics.Vector3, Windows.Foundation.Point etc. Je veux m'assurer que les valeurs soient correctes!

dr1rrb avatar Nov 26 '25 22:11 dr1rrb

@copilot src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs:4803-4822

Non, dΓ©fait Γ§a, le commenatire dit clairement que y'a un cas particulier pour Int32, remet `return...

Done in 3c8b545e:

  • Reverted Int32/Int64/Int16/Byte validation back to original behavior
  • Added validation to SplitAndJoin function which now validates each numeric component for Vector2, Vector3, Point, Size, and Matrix types
  • Replaced When_Invalid_Int32_Value test with When_Invalid_Point_Value test

Copilot avatar Nov 26 '25 22:11 Copilot

πŸ€– Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21976/wasm-skia-net9/index.html

unodevops avatar Nov 26 '25 23:11 unodevops

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html

unodevops avatar Nov 27 '25 00:11 unodevops

The build 185294 found UI Test snapshots differences: android-28-net9: 18, android-28-net9-Snap: 35, ios: 4, ios-Snap: 64, skia-linux-screenshots: 69, skia-windows-screenshots: 457, wasm: 114, wasm-automated-net10.0-WinUI-Benchmarks-automated: 0, wasm-automated-net10.0-WinUI-Default-automated: 15, wasm-automated-net10.0-WinUI-RuntimeTests-0: 0, wasm-automated-net10.0-WinUI-RuntimeTests-1: 0, wasm-automated-net10.0-WinUI-RuntimeTests-2: 0

Details
  • android-28-net9: 18 changed over 825

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • Detereminate_ProgressRing_Validation50_[#FF0000_#008000_#008000_#FF0000]_Progress-Ring-Value-50
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • ListView_ListViewWithHeader_InitializesTest_SamplesApp_Windows_UI_Xaml_Controls_ListView_HorizontalListViewGrouped
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • WebView_NavigateToAnchor_Initial
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • When_Parent_PointerMoved_After_drag_on_ScrollViewer_-_touch
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • NativeCommandBar_Size_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Dynamic
  • android-28-net9-Snap: 35 changed over 1077

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • Default_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • Scrolling_MUXControlsTestApp_ScrollViewDynamicPage_MUXControlsTestApp_ScrollViewDynamicPage
    • TextBlock_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout
    • NavigationView_MUXControlsTestApp_NavigationViewTopNavOnlyPage_MUXControlsTestApp_NavigationViewTopNavOnlyPage
    • NavigationView_MUXControlsTestApp_NavigationViewTopNavPage_MUXControlsTestApp_NavigationViewTopNavPage
    • RatingControl_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Basic_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Basic
    • MUX_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • ListView_ListViewResizable_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewResizable
    • TabView_MUXControlsTestApp_TabViewPage_MUXControlsTestApp_TabViewPage
    • CommandBar_Examples_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Examples
    • TeachingTip_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage
    • Icons_UITests_Microsoft_UI_Xaml_Controls_ImageIconTests_ImageIconPage_UITests_Microsoft_UI_Xaml_Controls_ImageIconTests_ImageIconPage
    • Icons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground
    • CommandBarFlyout_MUXControlsTestApp_CommandBarFlyoutPage_MUXControlsTestApp_CommandBarFlyoutPage
  • ios: 4 changed over 255

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • Check_ListView_Swallows_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
  • ios-Snap: 64 changed over 994

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Icons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground
    • Microsoft_UI_Xaml_Media_UITests_Windows_UI_Xaml_Media_ThemeShadowTests_ThemeShadow_Overlap_UITests_Windows_UI_Xaml_Media_ThemeShadowTests_ThemeShadow_Overlap
    • Popup_MessageDialog_UITests_Shared_Windows_UI_Xaml_Controls_Popup_MessageDialog
    • Brushes_EllipsemaskingEllipseGrid_Uno_UI_Samples_UITests_ImageBrushTestControl_EllipsemaskingEllipseGrid
    • Brushes_PathImageBrushfill_Uno_UI_Samples_UITests_ImageBrushTestControl_PathImageBrushfill
    • Buttons_Custom_Button_With_ContentTemplate_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Custom_Button_With_ContentTemplate
    • Brushes_PanelImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_PanelImageBrush
    • Grid_CenteredGridinGridwiththreefixedsizechildren_Uno_UI_Samples_Content_UITests_GridTestsControl_CenteredGridinGridwiththreefixedsizechildren
    • Image_Image_Stretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • Microsoft_UI_Composition_UITests_Windows_UI_Composition_MixTransformCliPropertyAndClippedByParentWithBorders_Then_RenderingIsValid_UITests_Windows_UI_Composition_MixTransformCliPropertyAndClippedByParentWithBorders_Then_RenderingIsValid
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • Microsoft_UI_Composition_UITests_Windows_UI_Composition_TransformElementClippedByParent_Then_ClippingAppliedPostRendering_UITests_Windows_UI_Composition_TransformElementClippedByParent_Then_ClippingAppliedPostRendering
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl
    • NavigationView_MUXControlsTestApp_NavigationViewMenuItemStretchPage_MUXControlsTestApp_NavigationViewMenuItemStretchPage
    • NavigationView_MUXControlsTestApp_NavigationViewSelectedItemEdgeCasePage_MUXControlsTestApp_NavigationViewSelectedItemEdgeCasePage
    • NavigationView_MUXControlsTestApp_NavigationViewAnimationPage_MUXControlsTestApp_NavigationViewAnimationPage
    • NavigationView_MUXControlsTestApp_NavigationViewStretchPage_MUXControlsTestApp_NavigationViewStretchPage
    • NavigationView_MUXControlsTestApp_NavigationViewRS3Page_MUXControlsTestApp_NavigationViewRS3Page
    • NavigationView_MUXControlsTestApp_NavigationViewBlankPage1_MUXControlsTestApp_NavigationViewBlankPage1
  • skia-linux-screenshots: 69 changed over 2306

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • Buttons.png-dark
    • Buttons.png
    • Examples.png-dark
    • Examples.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ImageSourceUrlMsAppDataScheme.png-dark
    • ImageSourceUrlMsAppDataScheme.png
    • Image_Margin_Large.png-dark
    • Image_Margin_Large.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
  • skia-windows-screenshots: 457 changed over 2306

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppBarButtonTest.png
    • AppBarToggleButtonTest.png
    • Attributed_text_FontSize_Changing.png
    • AutoSizedPathCentered.png-dark
    • AutoSizedPathCentered.png
    • Basics.png
    • Basics_Automated.png-dark
    • Border_With_CompositeTransform.png-dark
    • FixedWidth.png-dark
    • FixedWidth.png
    • Grid_Multi_Column_Span.png-dark
    • Grid_Multi_Column_Span.png
    • Arrange_Performance01.png
    • Basics Pivot Test.png-dark
    • Basics Pivot Test.png
    • Border_With_CompositeTransform.png
    • Border_With_Off_Centre_RotateTransform.png-dark
    • CheckBox_Button_UWA_Style.png-dark
    • CheckBox_Button_UWA_Style.png
    • ComboBox_SelectedIndex.png-dark
  • wasm: 114 changed over 1058

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Inside_ListView
    • UITests.Microsoft_UI_Xaml_Controls.TeachingTipTests.TeachingTipBasicPage
    • UITests.Windows_UI_Xaml_Controls.TextBox.TextBox_WithPadding_Focus
    • UITests.Windows_UI_Xaml_Controls.TextBox.TextBox_Wrapping
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Fill
    • UITests.Windows_UI_Xaml_Media_Animation.DoubleAnimation_FinalState_Transforms
    • initial_state
    • Uno.UI.Samples.Content.UITests.ButtonTestsControl.Button_Enabled_Control_Disabled
    • SamplesApp.Samples.Windows_UI_Xaml_Controls.NavigationViewTests.NavigationView_BasicNavigation
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_PlaceholderText
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_Item
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_Item_Large
    • UITests.Microsoft_UI_Xaml_Controls.NumberBoxTests.NumberBox_Header
    • UITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewBasicPage
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewItemsSourceTests
    • UITests.Windows_ApplicationModel.DataTransfer.DataTransferManagerTests
    • UITests.Windows_Devices.Midi.MidiDeviceInput
    • UITests.Windows_UI_Xaml.xLoadTests.xLoad_xBind
  • wasm-automated-net10.0-WinUI-Benchmarks-automated: 0 changed over 1

  • wasm-automated-net10.0-WinUI-Default-automated: 15 changed over 877

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_StretchAndAlignmentNone_ImageBrush-50-50-None-XLeft-YBottom
    • Default_StrokeThickness_MyEllipse
    • Default_StrokeThickness_MyRect
    • Default_StrokeThickness_MyPolyline
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • Default_StrokeThickness_MyPath
    • Default_StrokeThickness_MyLine
    • When_Theme_Changed_No_Crash_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • Default_StrokeThickness_MyPolygon
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • wasm-automated-net10.0-WinUI-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net10.0-WinUI-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net10.0-WinUI-RuntimeTests-2: 0 changed over 1

nventive-devops avatar Nov 27 '25 04:11 nventive-devops

⚠️⚠️ The build 185294 has failed on Uno.UI - CI.

unodevops avatar Nov 27 '25 04:11 unodevops

@copilot The throw cause invalid CS to be generated. Please replace the throw you added by AddError and instead return default value.

dr1rrb avatar Dec 08 '25 20:12 dr1rrb

@copilot The throw cause invalid CS to be generated. Please replace the throw you added by AddError and instead return default value.

Done in cdec53b0 - Replaced all throw new XamlGenerationException() with AddError() calls and return appropriate default values:

  • Thickness: returns new Thickness(0)
  • CornerRadius: returns new CornerRadius(0)
  • GridLength: returns new GridLength(0f, Pixel)
  • Double/Single: returns 0d or 0f
  • SplitAndJoin (Vector2, Point, etc.): returns "0, 0"

Also made BuildThickness, BuildCornerRadius, and BuildGridLength non-static to access the instance method AddError().

Copilot avatar Dec 08 '25 20:12 Copilot

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html

unodevops avatar Dec 08 '25 22:12 unodevops

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html

unodevops avatar Dec 08 '25 23:12 unodevops

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html

unodevops avatar Dec 09 '25 15:12 unodevops

/azp run

dr1rrb avatar Dec 10 '25 23:12 dr1rrb

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Dec 10 '25 23:12 azure-pipelines[bot]

πŸ€– Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html

unodevops avatar Dec 11 '25 01:12 unodevops