.NET MAUI 9: Bindings fallback to reflection-based bindings when path is invalid #2558
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]
In the cases when there is a binding with a
Source
but it inherits thex:DataType
from the parent, there can often be a mismatch between thex:DataType
and the type of theSource
.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 exampleBindingContext
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
The text was updated successfully, but these errors were encountered: