.NET 11 Preview 2 Updates MAUI with Performance Improvements and Platform Refinements
#Mobile

.NET 11 Preview 2 Updates MAUI with Performance Improvements and Platform Refinements

Infrastructure Reporter
2 min read

Microsoft's .NET 11 Preview 2 delivers targeted MAUI updates focusing on XAML ergonomics, binding performance, and API consistency, with concrete improvements to the Map control, binding operations, and immutability guarantees.

Microsoft has released .NET 11 Preview 2, delivering targeted updates to .NET Multi-platform App UI (MAUI) that focus on refining existing APIs rather than introducing new surface area. The release addresses specific usability and performance issues in XAML, data binding, and control behavior, providing measurable improvements for developers building cross-platform applications.

Featured image

The Map control receives the most visible enhancements in this release. Developers can now define coordinates directly in XAML without x:Arguments through new TypeConverter support for Location and MapSpan types. This change eliminates the verbosity previously required when working with map coordinates in XAML. Additionally, a new Map.Region bindable property enables declarative initialization of the visible map area, allowing developers to set the initial viewport without procedural code.

Runtime control over map elements has also improved. All map shapes—including Polygon, Polyline, and Circle—now support IsVisible and ZIndex properties. This allows developers to toggle visibility and control rendering order without removing elements from the map. These shape elements also expose click events across Android, iOS, and Mac Catalyst platforms, enabling interactive overlays without custom platform code.

Binding performance sees substantial gains through optimization of TypedBinding and SourceGeneratedBinding. The release implements delegate caching, binding mode caching, and removes unnecessary conversions. According to the release notes, TypedBinding execution time decreased from 47.47 nanoseconds to 32.90 nanoseconds, while memory allocation dropped from 128 bytes to 64 bytes per operation. Source-generated bindings show similar improvements, with roughly 25 percent faster execution and half the memory usage. These optimizations directly impact data-heavy applications where bindings are frequently evaluated.

The release formalizes immutability guarantees for commonly used types. Color is now annotated with ImmutableObject(true), and Font has been converted into a read-only struct. This enables the XAML source generator to safely cache instances and generate more efficient code paths, improving runtime performance without requiring application changes.

API consistency receives attention through changes to VisualStateManager. The GetVisualStateGroups method now returns VisualStateGroupList instead of IList, aligning it with the SetVisualStateGroups API. This represents a breaking change for code that depends on the previous return type and may require updates in strongly typed scenarios.

A long-standing binding issue has been resolved. When binding Entry.Text to nullable value types such as int?, clearing the input now correctly sets the bound property to null instead of retaining the previous value. This improves correctness in two-way binding scenarios involving optional numeric input.

These updates continue .NET MAUI's recent direction of refining existing APIs rather than expanding the framework's surface area. While the changes are not extensive, they address concrete issues reported by developers and improve core parts of the framework. Developers can review the full set of changes and associated pull requests in the MAUI release notes on GitHub, which provide detailed context for each update.

The .NET 11 Preview 2 is available for download as a preview runtime and tools package, allowing developers to test these improvements in their applications before the final release.

Comments

Loading comments...