[XSG] resolve xRefs through listnodes#32028
Conversation
x:Reference optimization for XSG wasn't able to walk up the tree when a node is a ListNode - fixes #31995
There was a problem hiding this comment.
Pull Request Overview
Resolves x:Reference source generation not traversing parent ListNode wrappers, enabling proper reference resolution within item templates.
- Adds a test XAML page (Maui31995) intended to exercise x:Reference inside a BindableLayout/DataTemplate.
- Updates ProvideValueForReferenceExtension to walk past intermediate ListNode parents before continuing upward.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Controls/src/SourceGen/KnownMarkups.cs | Adjusts ancestor traversal to skip ListNode wrappers for x:Reference resolution. |
|
I'll try the nuget in the morning. Thank you. |
|
Unfortunately, I was unable to test nugets because I'm getting
It appears that this nuget package is not public. |
not even with the nuget.config from this branch? it should work with the public feeds there.. just copy them they should be public |
|
/backport release/10.0.1xx |
|
Thanks. Yes, I can compile my app with this PR's nugets. The compilation error is gone. |
|
/backport to release/10.0.1xx |
|
Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18716522666 |
Description of Change
x:Reference optimization for XSG wasn't able to walk up the tree when a node is a ListNode
Issues Fixed
x:Referencedoes not appear to work #31995