-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[XC|XSG] fix target resolution #31229
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 XML namespace (xmlns) resolution issues when compiling XAML with the source generator, specifically for visual state targets. The fix ensures that type resolution considers the correct namespace context when resolving types in visual state setters.
- Updates the BindablePropertyConverter to properly handle XmlType objects instead of string type names
- Modifies NodeSGExtensions to use XmlType for type resolution in source generation context
- Adds comprehensive test coverage for the xmlns resolution scenario
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Controls/tests/Xaml.UnitTests/Issues/Maui31186.xaml |
Test XAML file demonstrating visual state with custom button type using local xmlns |
src/Controls/tests/Xaml.UnitTests/Issues/Maui31186.xaml.cs |
Unit test validating xmlns resolution for visual state targets works in both runtime and source generation scenarios |
src/Controls/src/SourceGen/NodeSGExtensions.cs |
Updates GetBindablePropertyTarget method to use XmlType instead of string for proper namespace resolution |
src/Controls/src/Build.Tasks/XmlTypeExtensions.cs |
Minor whitespace formatting fix |
src/Controls/src/Build.Tasks/XamlCache.cs |
Method name correction from GetXmlsDefinitions to GetXmlnsDefinitions |
src/Controls/src/Build.Tasks/CompiledConverters/BindablePropertyConverter.cs |
Major refactoring to use XmlType objects throughout for proper namespace-aware type resolution |
src/Controls/src/Build.Tasks/CompiledConverters/BindablePropertyConverter.cs
Outdated
Show resolved
Hide resolved
ff5e514 to
e7a384c
Compare
|
/backport to release/10.0.1xx-rc1 |
|
Started backporting to release/10.0.1xx-rc1: https://github.com/dotnet/maui/actions/runs/17073533095 |
Backport of #31229 to release/10.0.1xx-rc1 /cc @rmarinho @StephaneDelcroix
Description of Change
resolve type in the right xmlns for visual state targets
Issues Fixed