-
Notifications
You must be signed in to change notification settings - Fork 834
fix(xamlreader): Accept valid toplevel properties and positional binding parameters #21784
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issues with the FailOnUnknownProperties feature in the XamlReader by adding special handling for internal XAML members that should not be validated as properties. The changes prevent false positives when strict property validation is enabled for XAML parsing.
- Added handling to skip validation for the
basemember (used for XAML inheritance) - Added handling to skip validation for
_PositionalParameters(used internally for markup extension parameters like in{Binding Foo, Mode=TwoWay}) - Added comprehensive test coverage for various binding scenarios with
FailOnUnknownPropertiesenabled
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Uno.UI/UI/Xaml/Markup/Reader/XamlObjectBuilder.cs | Added two special-case checks to skip validation for internal XAML members base and _PositionalParameters when FailOnUnknownProperties is enabled |
| src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Markup/Given_XamlReader.cs | Added comprehensive test coverage including valid/invalid binding scenarios, StaticResource usage, and a helper method EnsureFailOnUnknownProperty() for test setup |
|
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21784/docs/index.html |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Markup/Given_XamlReader.cs
Show resolved
Hide resolved
|
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21784/docs/index.html |
|
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21784/wasm-skia-net9/index.html |
|
The build 182034 found UI Test snapshots differences: Details
|
|
|
|
@Mergifyio backport release/stable/6.4 |
β Backports have been createdDetails
|
β¦6.4/pr-21784 fix(xamlreader): Accept valid toplevel properties and positional binding parameters (backport #21784)
PR Type:
What is the current behavior? π€
Failures with:
The Property base does not exist on {http://schemas.microsoft.com/winfx/2006/xaml/presentation}Page...The type 'Microsoft.UI.Xaml.Data.Binding' does not contain a property or event named '_PositionalParameters'. [Line: 42 Position: 46];when bindings are placed inside a data templateWhat is the new behavior? π
No failures.
PR Checklist β
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information βΉοΈ