fix: Generate UXAML0001 error for invalid property values with valid C# fallback
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
0dor0fon 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 accessAddError) - Added validation in
XamlFileGenerator.BuildCornerRadius()for CornerRadius values (changed to non-static to accessAddError) - Added validation in
XamlFileGenerator.BuildGridLength()for GridLength values (changed to non-static to accessAddError) - 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()withAddError()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:
- [x] π Commits must be following the Conventional Commits specification.
- [x] π§ͺ Added Runtime tests, UI tests, or a manual test sample for the changes have been added (for bug fixes / features) (if applicable)
- [ ] π Docs have been added/updated which fit documentation template (for bug fixes / features)
- [ ] πΌοΈ Validated PR
Screenshots Compare Test Runresults. - [x] β Contains NO breaking changes
Other information βΉοΈ
- Tests added to
Given_Parser.csinUno.UI.SourceGenerators.Tests, positioned right after theWhen_Invalid_Object_Propertytest 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 geterror CS0103: The name 'auto' does not exist in the current contextin gen'ed code. We should get aXAML0001at the right location in the XAMLWhy 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 filehttps://github.com/unoplatform/uno/blob/master/src/SourceGenerators/Uno.UI.SourceGenerators.Tests/XamlCodeGeneratorTests/Given_Parser.csthat repro this failure whenMargin="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.
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.
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.
π€ 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
@copilot Please move it to line 309, right after the When_Invalid_Object_Property test
@copilot Please move it to line 309, right after the
When_Invalid_Object_Propertytest
Done in d88ccacd - moved the test to line 310, right after When_Invalid_Object_Property.
@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
@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:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
@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
@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_ValueWhen_Invalid_GridLength_ValueWhen_Invalid_Double_ValueWhen_Invalid_Int32_Value
@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!
@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
SplitAndJoinfunction which now validates each numeric component for Vector2, Vector3, Point, Size, and Matrix types - Replaced
When_Invalid_Int32_Valuetest withWhen_Invalid_Point_Valuetest
π€ 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
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html
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-25Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75Detereminate_ProgressRing_Validation50_[#FF0000_#008000_#008000_#FF0000]_Progress-Ring-Value-50ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItemsListView_ListViewWithHeader_InitializesTest_SamplesApp_Windows_UI_Xaml_Controls_ListView_HorizontalListViewGroupedSequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPageProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPageWebView_NavigateToAnchor_InitialWhen_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_PointersWhen_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_PointersWhen_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_PointersWhen_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewerWhen_Parent_PointerMoved_After_drag_on_ScrollViewer_-_touchWhen_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_PointersDecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPageNativeCommandBar_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_SmallerNavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4PageDefault_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigationGesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEventsScrolling_MUXControlsTestApp_ScrollViewDynamicPage_MUXControlsTestApp_ScrollViewDynamicPageTextBlock_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_LayoutNavigationView_MUXControlsTestApp_NavigationViewTopNavOnlyPage_MUXControlsTestApp_NavigationViewTopNavOnlyPageNavigationView_MUXControlsTestApp_NavigationViewTopNavPage_MUXControlsTestApp_NavigationViewTopNavPageRatingControl_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPage_UITests_Microsoft_UI_Xaml_Controls_RatingControlTests_RatingControlPageBrushes_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse_Uno_UI_Samples_UITests_ImageBrushTestControl_EllipseImage_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Basic_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_BasicMUX_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPagePickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_ThemingListView_ListViewResizable_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewResizableTabView_MUXControlsTestApp_TabViewPage_MUXControlsTestApp_TabViewPageCommandBar_Examples_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_ExamplesTeachingTip_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPageIcons_UITests_Microsoft_UI_Xaml_Controls_ImageIconTests_ImageIconPage_UITests_Microsoft_UI_Xaml_Controls_ImageIconTests_ImageIconPageIcons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_ForegroundCommandBarFlyout_MUXControlsTestApp_CommandBarFlyoutPage_MUXControlsTestApp_CommandBarFlyoutPage
-
ios: 4 changed over 255π¨π¨ Comparison Details (first 20) π¨π¨
ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220Check_ListView_Swallows_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_MeasureProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220TextBox_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_ForegroundMicrosoft_UI_Xaml_Media_UITests_Windows_UI_Xaml_Media_ThemeShadowTests_ThemeShadow_Overlap_UITests_Windows_UI_Xaml_Media_ThemeShadowTests_ThemeShadow_OverlapPopup_MessageDialog_UITests_Shared_Windows_UI_Xaml_Controls_Popup_MessageDialogBrushes_EllipsemaskingEllipseGrid_Uno_UI_Samples_UITests_ImageBrushTestControl_EllipsemaskingEllipseGridBrushes_PathImageBrushfill_Uno_UI_Samples_UITests_ImageBrushTestControl_PathImageBrushfillButtons_Custom_Button_With_ContentTemplate_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Custom_Button_With_ContentTemplateBrushes_PanelImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_PanelImageBrushGrid_CenteredGridinGridwiththreefixedsizechildren_Uno_UI_Samples_Content_UITests_GridTestsControl_CenteredGridinGridwiththreefixedsizechildrenImage_Image_Stretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_NoneMicrosoft_UI_Composition_UITests_Windows_UI_Composition_MixTransformCliPropertyAndClippedByParentWithBorders_Then_RenderingIsValid_UITests_Windows_UI_Composition_MixTransformCliPropertyAndClippedByParentWithBorders_Then_RenderingIsValidImage_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_HorizontalMicrosoft_UI_Composition_UITests_Windows_UI_Composition_TransformElementClippedByParent_Then_ClippingAppliedPostRendering_UITests_Windows_UI_Composition_TransformElementClippedByParent_Then_ClippingAppliedPostRenderingImage_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_VerticalImage_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControlNavigationView_MUXControlsTestApp_NavigationViewMenuItemStretchPage_MUXControlsTestApp_NavigationViewMenuItemStretchPageNavigationView_MUXControlsTestApp_NavigationViewSelectedItemEdgeCasePage_MUXControlsTestApp_NavigationViewSelectedItemEdgeCasePageNavigationView_MUXControlsTestApp_NavigationViewAnimationPage_MUXControlsTestApp_NavigationViewAnimationPageNavigationView_MUXControlsTestApp_NavigationViewStretchPage_MUXControlsTestApp_NavigationViewStretchPageNavigationView_MUXControlsTestApp_NavigationViewRS3Page_MUXControlsTestApp_NavigationViewRS3PageNavigationView_MUXControlsTestApp_NavigationViewBlankPage1_MUXControlsTestApp_NavigationViewBlankPage1
-
skia-linux-screenshots: 69 changed over 2306π¨π¨ Comparison Details (first 20) π¨π¨
ButtonClippingTestsControl.png-darkButtons.png-darkButtons.pngExamples.png-darkExamples.pngGamepad_CurrentReading.png-darkGamepad_Enumeration.png-darkGamepad_Enumeration.pngImageSourceUrlMsAppDataScheme.png-darkImageSourceUrlMsAppDataScheme.pngImage_Margin_Large.png-darkImage_Margin_Large.pngDoubleImageBrushInList.png-darkDoubleImageBrushInList.pngCalendarView_Theming.png-darkCalendarView_Theming.pngDisplayInformation.png-darkDisplayInformation.pngImageIconPage.png-darkImageIconPage.png
-
skia-windows-screenshots: 457 changed over 2306π¨π¨ Comparison Details (first 20) π¨π¨
AppBarButtonTest.pngAppBarToggleButtonTest.pngAttributed_text_FontSize_Changing.pngAutoSizedPathCentered.png-darkAutoSizedPathCentered.pngBasics.pngBasics_Automated.png-darkBorder_With_CompositeTransform.png-darkFixedWidth.png-darkFixedWidth.pngGrid_Multi_Column_Span.png-darkGrid_Multi_Column_Span.pngArrange_Performance01.pngBasics Pivot Test.png-darkBasics Pivot Test.pngBorder_With_CompositeTransform.pngBorder_With_Off_Centre_RotateTransform.png-darkCheckBox_Button_UWA_Style.png-darkCheckBox_Button_UWA_Style.pngComboBox_SelectedIndex.png-dark
-
wasm: 114 changed over 1058π¨π¨ Comparison Details (first 20) π¨π¨
SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Inside_ListViewUITests.Microsoft_UI_Xaml_Controls.TeachingTipTests.TeachingTipBasicPageUITests.Windows_UI_Xaml_Controls.TextBox.TextBox_WithPadding_FocusUITests.Windows_UI_Xaml_Controls.TextBox.TextBox_WrappingUITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_BackgroundUITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_FillUITests.Windows_UI_Xaml_Media_Animation.DoubleAnimation_FinalState_Transformsinitial_stateUno.UI.Samples.Content.UITests.ButtonTestsControl.Button_Enabled_Control_DisabledSamplesApp.Samples.Windows_UI_Xaml_Controls.NavigationViewTests.NavigationView_BasicNavigationSamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_PlaceholderTextSamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_ItemSamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_Item_LargeUITests.Microsoft_UI_Xaml_Controls.NumberBoxTests.NumberBox_HeaderUITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewBasicPageUITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationPropertiesUITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewItemsSourceTestsUITests.Windows_ApplicationModel.DataTransfer.DataTransferManagerTestsUITests.Windows_Devices.Midi.MidiDeviceInputUITests.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_SequentialAnimationsPageWhen_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_PointersWhen_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_PointersWhen_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_PointersWhen_StretchAndAlignmentNone_ImageBrush-50-50-None-XLeft-YBottomDefault_StrokeThickness_MyEllipseDefault_StrokeThickness_MyRectDefault_StrokeThickness_MyPolylineListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItemsTestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_FeaturesDefault_StrokeThickness_MyPathDefault_StrokeThickness_MyLineWhen_Theme_Changed_No_Crash_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_ThemingDefault_StrokeThickness_MyPolygonWhen_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
β οΈβ οΈ The build 185294 has failed on Uno.UI - CI.
@copilot The throw cause invalid CS to be generated. Please replace the throw you added by AddError and instead return default value.
@copilot The
throwcause invalid CS to be generated. Please replace thethrowyou added byAddErrorand 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
0dor0f - SplitAndJoin (Vector2, Point, etc.): returns
"0, 0"
Also made BuildThickness, BuildCornerRadius, and BuildGridLength non-static to access the instance method AddError().
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html
/azp run
Azure Pipelines successfully started running 2 pipeline(s).
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21976/docs/index.html