Skip to content
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

Fix CompiledBinding with RelativeSource/ElementName but no Path #14514

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

grokys
Copy link
Member

@grokys grokys commented Feb 6, 2024

What does the pull request do?

As described in #14456, CompiledBindings were in some cases not respecting RelativeSource and ElementName despite this working with the "shorthand" syntax.

The problem was that in AvaloniaXamlIlBindingPathParser.Transform the convertedNode was being discarded if the binding node had no arguments or property value assignments. Add in an extra case to make sure that doesn't happen.

Fixed issues

Fixes #14456

And one passing test.
...without a path. Previously the `convertedNode` was being discarded if the binding node had no arguments or property value assignments.

Fixes #14456
@grokys grokys added bug backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Feb 6, 2024
@grokys grokys force-pushed the fixes/14456-compiledbinding-relativesource branch from 41641ab to 3b81ffc Compare February 6, 2024 11:10
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0044514-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Feb 6, 2024
Merged via the queue into master with commit c2e9679 Feb 6, 2024
7 checks passed
@maxkatz6 maxkatz6 deleted the fixes/14456-compiledbinding-relativesource branch February 6, 2024 21:15
maxkatz6 pushed a commit that referenced this pull request Feb 8, 2024
* Added failing tests for #14456.

And one passing test.

* Handle converted compiled binding nodes...

...without a path. Previously the `convertedNode` was being discarded if the binding node had no arguments or property value assignments.

Fixes #14456
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiled/reflection bindings not consistent with RelativeSource=Self
3 participants