-
Notifications
You must be signed in to change notification settings - Fork 239
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.Pri3doc-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]
Description
In .NET MAUI 9, compiled bindings can be used with C# markup (to replace reflection-based bindings with string paths).
Example:
// in .NET 8
MyLabel.SetBinding(Label.TextProperty, "Text");
// in .NET 9
MyLabel.SetBinding(Label.TextProperty, static (Entry entry) => entry.Text);This new approach has several advantages:
- better performance (benefits are already summarized in the docs: https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/data-binding/compiled-bindings?view=net-maui-8.0#performance)
- intellisense while editing
- compile-time check of path validity
This approach is required instead of string-based bindings in NativeAOT apps, and in apps with full trimming enabled.
More info: dotnet/maui#21725
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.Pri3doc-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]