.NET Multi-platform App UI

Information .NET Core android

Introducing .NET MAUI with .NET 6

With the release of .NET 6 in November 2021 there will be a successor to the now 6 years old Xamarin.Forms UI called .NET MAUI (short for .NET Multi-platform App UI).  Microsofts goal here is (once again^^) "one UI for many devices".

Single Project Developer Experience

NET MAUI simplifies the project structure into a single project to target multiple platforms. This means you can easily deploy to any target that you wish including your desktop, emulators, simulators, or physical devices with a single click. With built-in cross-platform resources you will be able to add any images, fonts, or translation files into the single project, and .NET MAUI will automatically setup native hooks so you can just code. Finally, you will always have access the native underlying operating system APIs and it will be easier than ever with new platform specific integrations. Under platforms you can add source code files for a specific operating system (iOS, Android, Windows) and access the native APIs.

Supported IDEs

  • Visual Studio 2019
  • Visual Studio for Mac
  • Visual Studio Code

App Patterns

  • MVVM & XAML
  • MVU (Model View Update)
  • Blazor

MVU pattern

The Model-View-Update pattern promotes a one-way flow of data and state management, as well as a code-first development experience that rapidly updates the UI by applying only the changes necessary.

readonly State<int> count = 0;

[Body]
View body() => new StackLayout
{
new Label("Welcome to .NET MAUI!"),
new Button(
() => $"You clicked {count} times.",
() => count.Value ++)
)
};

This pattern is ideally suited for hot reload with added styling, gradients, and fonts with instant hot reload.

Timeline

Microsoft promises to support Xamarin.Forms for quite a while after .NET 6 has been released, so there is no need to switch immediately to .NET MAUI for older projects. With the release of .NET 6 not only the first release of .NET MAUI will be available but also the last release of Xamarin Forms that will be getting updates for a year after release.  And M$FT also plans to provide a Converter to bring Xamarin.Forms applications to .NET MAUI.