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

Open
davidbritch opened this issue Oct 9, 2024 · 0 comments
Labels
🏁 Release: .NET 9 Work items for the .NET 9 release doc-enhancement Improve the current content [org]

Comments

@davidbritch
Copy link
Contributor

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

@davidbritch davidbritch added 🏁 Release: .NET 9 Work items for the .NET 9 release doc-enhancement Improve the current content [org] labels Oct 9, 2024
@davidbritch davidbritch removed the Pri3 label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏁 Release: .NET 9 Work items for the .NET 9 release doc-enhancement Improve the current content [org]
Projects
None yet
Development

No branches or pull requests

1 participant