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

[XC] Compile TemplateBindingExtension #22008

Merged
merged 3 commits into from
May 29, 2024

Conversation

simonrozsival
Copy link
Member

Description of Change

{TemplateBinding ...} is "just" a shorthand for {Binding RelativeSource={RelativeSource TemplatedParent}, Path = ...}. It should be possible to use {TemplateBinding} with NativeAOT as well and so it should be possible to compile it.

Issues Fixed

Contributes to #18658

@simonrozsival simonrozsival added the area-xaml XAML, CSS, Triggers, Behaviors label Apr 23, 2024
@simonrozsival simonrozsival requested a review from a team as a code owner April 23, 2024 16:28
)
foreach (var instruction in CompileBindingPath(node, context, vardefref.VariableDefinition))
yield return instruction;
if (bpRef is not null) // do not compile bindings if we're not gonna SetBinding
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope we can remove this condition in #22023

@jsuarezruiz
Copy link
Contributor

Could you rebase to fix the conflict? Thnx!

@simonrozsival simonrozsival force-pushed the compile-template-binding branch from 240f0a3 to 9350443 Compare May 10, 2024 07:31
@rmarinho rmarinho merged commit 58b0da6 into dotnet:net9.0 May 29, 2024
48 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants