-
Notifications
You must be signed in to change notification settings - Fork 251
.NET MAUI 9: Compiled bindings #2427
Copy link
Copy link
Closed
Labels
🏁 Release: .NET 10Work items for the .NET 10 releaseWork items for the .NET 10 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.doc-enhancementImprove the current content [org]Improve the current content [org]resolved-by-customerIndicates issues where the customer no longer needs any help. [org]Indicates issues where the customer no longer needs any help. [org]
Metadata
Metadata
Assignees
Labels
🏁 Release: .NET 10Work items for the .NET 10 releaseWork items for the .NET 10 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.Identifies that an issue has been imported into Quest.doc-enhancementImprove the current content [org]Improve the current content [org]resolved-by-customerIndicates issues where the customer no longer needs any help. [org]Indicates issues where the customer no longer needs any help. [org]
Type
Fields
Give feedbackNo fields configured for issues without a type.
In .NET MAUI 9 there's a source generator that allows developers to call the
SetBindingextension method to define bindings on their bindable objects usingFuncinstead ofstringpaths. 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