.NET MAUI 9: Compiled bindings #2427
Labels
🏁 Release: .NET 9
Work items for the .NET 9 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 .NET MAUI 9 there's a source generator that allows developers to call the
SetBinding
extension method to define bindings on their bindable objects usingFunc
instead ofstring
paths. There's also an additional API that builds on this that will not only set the binding directly to the object, but it will return the binding object instance and allow the developer to pass it to some other method and use it later.This approach is required instead of string-based bindings in NativeAOT apps, and in apps with full trimming enabled.
String-based binding in code:
Compiled binding in code:
Compiled binding in XAML:
Will also need to update the compiled bindings doc.
More info: dotnet/maui#23239
Associated WorkItem - 314392
The text was updated successfully, but these errors were encountered: