.NET 6 Preview is online, and it’s time for the new announcements in BUILD 2020. NET Multi-platform App UI (MAUI) is ready. For client application developers, it was a year. NET has many exciting changes. Let’s review the highlights and see what might happen next year.

The planning and project execution of.NET 6 is open, and we have a great website that centrally presents the whole. NET GitHub milestones and user stories. You can visit themesof.net and search in Xamarin for an overview.

.NET 6 and the mobile SDK

The core of this release is to unify the Xamarin SDK into. NET. Xamarin has always been. NET, but it is now published as core content, shares the same base libraries as other components such as Blazor, and adopts the modern SDK project system style to provide a consistent tooling experience. Xamarin is no longer like the others. NET or dependent on.net, but. NET itself. Consistent naming in documents and product pages will make this clearer.

Xamarin.Android and Xamarin. IOS are now available to you through. NET development involves additional platform objects, so we call them. NET for Android as well. NET for iOS. The SDKS themselves are. NET is bundled with Google’s and Apple’s native SDKS, respectively, so their apis have not been renamed.

.NET Multi-platform App UI (MAUI)

.net MAUI is an evolution of Xamarin.Forms, a cross-platform mobile-first framework for Android, iOS and UWP. With seven years of experience supporting customers ranging from independent developers to some of the largest global companies, we are improving core functionality, accelerating UI rendering, investing in consistent system design patterns, and expanding from mobile to desktop.

For xamarin.Forms customers, you can think of MAUI as the next major version of Xamarin.Forms as you know it now. For just starting to use. NET for multi-platform development, you can first understand what services we currently provide for you.

The quality of

Since mid-2020, the core team has focused on the larger impact issues in the product and designed a new control architecture to better serve the future. Xamarin. Forms is 5.0. The last major feature release before NET MAUI, and subsequent releases will contain only bug fixes. Xamarin.Forms will continue to be updated until November 2022.

No new controls are included in this release. We focus on the quality of our products. We are as excited as you are about the new features, and for that reason, we are very pleased to see such positive feedback on Xamarin Community Toolkit 1.0, which was released with Xamarin.Forms 5.0.

When you look at our Github repository, dotnet/Maui, you’ll find a more streamlined file organization that utilizes a multi-objective structure and has a more consistent naming style than Xamarin.Forms. We hope this will make it easier for contributors to find objects they want to change. Development activity is active in the main-handler branch of the Xamarin/Xamarin.Forms library, and these updates will be synchronized to DOTNET /MAUI.

performance

Application startup and UI response time are two critical parts of application performance. To help locate performance issues that may occur here, we have made significant improvements in AOT, startup tracking, and fast renderers. .NET MAUI addition can be from. In addition to the performance improvements in NET 6 itself, we have several changes that will significantly improve application performance!

The new Handler architecture in.NET MAUI eliminates view nesting and reduces the number of UI controls needed to render a view. It also fundamentally decouples the platform controls from the framework itself. In Xamarin.Forms, each renderer has a reference to cross-platform elements and usually relies on INotifyPropertyChanged to work. Instead of using these renderers,.NET MAUI introduces a new pattern called Handler.

Now, the relationship between the framework and the platform is inverted, and all the platform controls need to do is address the requirements of the framework. This not only improves efficiency, but also makes it easier to extend or rewrite. Gone are the days when you needed to create custom renderers or effects (we still make sure custom renderers and effects are available).

The new structure also makes the platform Handler more suitable for reuse by other frameworks such as Fabulous and innovative projects such as Comet and Blazor. We always focus on the future!

design

The design requirements for applications across multiple platforms have changed dramatically from years ago. When Xamarin.Forms was founded, most customers wanted their Android apps to look very much like Android and their iOS apps to look very much like iOS. We’ve introduced more and more styles and controls in Xamarin.Forms and made them look the same across platforms, and in iOS we’ve added the Visual Control API and the Material Design component. To give you the same user experience you have on Android. These efforts are part of the way customers show us their needs and in. NET MAUI, we laid the foundation for further development.

We’ll enable full-app application themes through Fluent UI and Material Design styles, use the necessary style apis and Visual States on existing controls, and increase support for control templates as much as possible.

On the experimental side, we also launched a new Visual strategy that combines native controls with graphable controls. We’ll have more information to share later this year. This will be friendly to customers who need 1:1 cross-platform design and want better performance, but need native platform support.

platform

The.net in MAUI. NET 6 includes Android, iOS, macOS and Windows. In addition, we are working with the Blazor team to include Blazor desktop development in.NET 6.

Xamarin has its roots in mobile development, which is certainly where most customers use it. Then we added Xamarin.Mac to implement Apple desktop development with tools that are tied to Appkit. .NET 6 now calls it. NET for macOS, however, we’ve seen Apple move in a different direction with desktop development for macOS, and we want to make sure we provide the best experience for you. To that end, we are introducing the Mac Catalyst. NET support, an Apple solution that brings iOS apps you build using UIKit to the desktop and extends them as needed through other AppKit and platform apis. You can browse Apple’s multiple first-party apps to experience it for yourself. .NET MAUI will also include this approach.

Xamarin.forms added a mobile-centric implementation to UWP when it was first targeted for deployment to Windows Mobile. In.NET MAUI, we are bringing more powerful support for the Desktop with WinUI 3 Desktop, the latest implementation of our Windows team partners building great applications. When it comes to UWP and WinUI related to.NET MAUI, the most common question we are asked is in. What XAML will look like in NET MAUI. Because.NET MAUI controls are multi-platform, not just Windows controls, and because we have a large number of Xamarin. NET MAUI allows you to have a consistent experience.

Single Project

One of the most exciting things we’ve announced through.NET MAUI is the Single Project experience. We found that developers focused on. NET Standard projects are at their most efficient when developing, not when jumping back and forth between Android, iOS, macOS and Windows projects.

As part of this experience, we are unifying many of our administrative approaches, such as font and image management, and reducing our reliance on the complexity of managing projects across multiple platforms. For developers who like or need multiple platform projects, it is still supported!

The.net thermal overload

The introduction of XAML Hot Reload over the past few years has resulted in significant savings. NET developer time. Changes made in XAML are pushed to the running application, avoiding tedious build and deployment cycles and helping developers focus better on application development. In.net 6, we extended it to C# and into other workloads as well. We can’t wait for you to experience this change in the second half of this year.

For.NET 6 and. NET MAUI ready

I hope you find the above highlights interesting. They come directly from talking to customers like you, and we’ve been. NET 6 has increased the priority of these topics. If you don’t see the update you want, let us know and we’ll start planning soon. NET 7 and later.

To help you prepare, here are some frequently asked questions and responses.

Q1: Should I use Xamarin.Forms today or wait? .net MAUI?

You can start using Xamarin.forms directly! We will provide migration to when everything is ready. NET MAUI method.

Q2: What do you do to migrate from Xamarin.Forms to MAUI?

First, you don’t need to rewrite the application. The first step is to update the project and solution to use the standard SDK. Then, update the xamarin.forms namespace and the NuGet package. Since this is a major release update, any outdated apis in your project should have been updated at this point. That’s all!

You can then choose whether to migrate the custom renderer to the new handler architecture to get all the possible performance gains. This can be done at your own pace.

Before migrating, you can explore in a new project. .net MAUI.

Q3: Does my custom renderer work?

We provide adapters that enable the renderer to work with the new handler, but we recommend that you update to the handler to get the performance boost. In addition, there is much less code to maintain when using handlers.

Q4: What about VS Code, Comet MVU and Blazor Mobile Bindings?

For now, they are all experimental projects, and we will continue to iterate:

  • Comet MVU
  • Blazor Mobile Bindings