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

.NET MAUI 9: Bindings fallback to reflection-based bindings when path is invalid #2558

Closed
davidbritch opened this issue Oct 9, 2024 · 0 comments · Fixed by #2585
Closed
Assignees
Labels
🏁 Release: .NET 10 Work items for the .NET 10 release doc-enhancement Improve the current content [org] 📌 seQUESTered Identifies that an issue has been imported into Quest. resolved-by-customer Indicates issues where the customer no longer needs any help. [org]

Comments

@davidbritch
Copy link
Contributor

davidbritch commented Oct 9, 2024

In the cases when there is a binding with a Source but it inherits the x:DataType from the parent, there can often be a mismatch between the x:DataType and the type of the Source.

Sometimes customers want to reference another element and access its BindingContext ({Binding BindingContext.Title Source={x:Reference ...}}). Since we don't support casting in the path, XamlC won't be able to correctly resolve and build the property chain (in the example BindingContext is of type object and it doesn't have any property Title).

While there are workarounds to these issues, .NET MAUI 9 fallback to a reflection-based binding that will resolve the actual properties at runtime in these cases to keep the apps working and produce a warning so that users can either choose to ignore it or address it.

More info: dotnet/maui#24238


Associated WorkItem - 330920

@davidbritch davidbritch added 🏁 Release: .NET 10 Work items for the .NET 10 release doc-enhancement Improve the current content [org] labels Oct 9, 2024
@davidbritch davidbritch removed the Pri3 label Oct 9, 2024
@davidbritch davidbritch self-assigned this Oct 25, 2024
@davidbritch davidbritch added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Oct 25, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Oct 25, 2024
@davidbritch davidbritch moved this from 🔖 Ready to 🏗 In progress in dotnet/docs-maui 2024 Sprints Oct 29, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in dotnet/docs-maui 2024 Sprints Oct 29, 2024
@dotnetrepoman dotnetrepoman bot added the resolved-by-customer Indicates issues where the customer no longer needs any help. [org] label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏁 Release: .NET 10 Work items for the .NET 10 release doc-enhancement Improve the current content [org] 📌 seQUESTered Identifies that an issue has been imported into Quest. resolved-by-customer Indicates issues where the customer no longer needs any help. [org]
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant