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

[X] Compile bindings with explicit source #20266

Closed
simonrozsival opened this issue Jan 31, 2024 · 3 comments
Closed

[X] Compile bindings with explicit source #20266

simonrozsival opened this issue Jan 31, 2024 · 3 comments
Labels
area-xaml XAML, CSS, Triggers, Behaviors

Comments

@simonrozsival
Copy link
Member

simonrozsival commented Jan 31, 2024

Currently, XamlC never compiles bindings when Source is specified. Since #19995 has been merged, we do not need to skip compiling bindings with explicit source.

We should also be able to infer the x:DataType value based on the Source in several cases:

  • When the source is RelativeSourceExtension with the mode Self or FindAncestor
  • When the source is a reference to an object of a known type Source={x:Reference mySource} (blocked by [XamlC] Compile x:Reference #20726)
  • When the source is an object with known type
@simonrozsival simonrozsival added the area-xaml XAML, CSS, Triggers, Behaviors label Jan 31, 2024
@simonrozsival
Copy link
Member Author

@StephaneDelcroix please check if I worded the issue correctly. Feel free to edit the issue directly.

@simonrozsival

This comment was marked as outdated.

@simonrozsival simonrozsival changed the title [X] Compile bindings with explicit (non-relative) source [X] Compile bindings with explicit source Feb 13, 2024
@PureWeen PureWeen added this to the .NET 9 Planning milestone Mar 15, 2024
@simonrozsival
Copy link
Member Author

This was implemented and merged into net9.0

@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-xaml XAML, CSS, Triggers, Behaviors
Projects
None yet
Development

No branches or pull requests

2 participants