On November 12th, Microsoft presented the .NET MAUI 9 in its final form. This version brings two new controls (HybridWebView and TitleBar), a slew of improvements throughout the framework, free SyncFusion controls and a Xcode sync tool for Apple-specific files. The performance and stability of the entire framework has been enhanced.
MAUI is an acronym that stands for Multiplatform Application UI. According to Microsoft, it’s an evolution of Xamarin and Xamarin Forms frameworks, unifying separate target libraries and projects into a single project for multiple devices. Currently, MAUI supports writing applications that run on Android 5+, iOS 12.2+, macOS 12+ (as Mac Catalyst), Samsung Tizen, Windows 10 version 1809+, or Windows 11. The new versions bumps the minimum Apple devices support from iOS 11 and macOS 10.15 in .NET MAUI 8.
The .NET MAUI 9 journey to the GA (general availability) version started with the Preview 1 in February 2024. A new preview was launched roughly every month, plus two RC (release candidate) versions were made available in September and October. These frequent releases caught bugs and performance fixes that were included in the final version.
The first of the newly added controls, HybridWebView, allows developers to host HTML, JavaScript and CSS content within a WebView
control, but with a communication bridge between the web view and the MAUI application code in .NET. On the JavaScript side there is a HybridWebViewMessageReceived
event and SendRawMessage
method. On the .NET side of the application there is a RawMessageReceived event and a SendRawMessage method on the control.
The second of the new controls, TitleBar, allows developers to create custom title bars in their application. For the moment, this control is only supported on the Windows platform, with Mac Catalyst support coming ‘in a future release’. The title bar control is then set to the parent Window object using the Window.TitleBar property.
While there are only two new first-party controls in .NET MAUI 9, the recent partnership with SyncFusion has added 14 new free controls from the vendor to MAUI as a package. The new MAUI version adds a sample application to the MAUI App template, which showcases how to use several of the contributed controls, together with recommended practices for common app patterns.
As for performance and stability improvements, one of the significant changes was the complete re-implementation of CollectionView and CarouselView controls on Apple devices. The new implementation requires a code change in the root MauiProgram
class.
The new version also brings several deprecated features. The most important one is the Frame control, which is marked as obsolete and should be replaced with the Border control. In addition, the Application.MainPage property is replaced by setting the Window.Page property to the first page of the app.
It is worth noting that just two days after the launch, a Service Release (SR) patch was released with the version 9.0.10 of the framework. The SR version adds small fixes to the GA code. It could be in response to the comments of users on social networks, complaining that upgrading to .NET MAUI 9 breaks Visual Studio or the build process. On the other hand, developers like Claudio Bernasconi are stating that "MAUI is heading in the right direction".
Readers can refer to GitHub official MAUI repository for complete release notes.