Open davidbritch opened 1 month ago
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:
More info: https://github.com/dotnet/maui/pull/21725
Hopefully we will have a second related API to create compiled bindings in C#: https://github.com/dotnet/maui/pull/23239
BindingBase binding = Binding.Create(static (Entry entry) => entry.Text);
In .NET MAUI 9, compiled bindings can be used with C# markup (to replace reflection-based bindings with string paths).
Example:
This new approach has several advantages:
More info: https://github.com/dotnet/maui/pull/21725