.NET MAUI Documentation

.NET MAUI: A Unified Cross-Platform Development Framework

Welcome to the overview of .NET Multi-platform App UI (.NET MAUI), the evolution of Xamarin.Forms. .NET MAUI is an open-source, cross-platform framework for creating native mobile and desktop applications with C# and XAML from a single, shared codebase.

What is .NET MAUI?

.NET MAUI allows you to build applications for:

It simplifies cross-platform development by providing a unified API to access native UI controls and platform-specific features across all target platforms. This means you can write your application logic and UI once and deploy it everywhere, significantly reducing development time and maintenance effort.

Key Features

How it Works

.NET MAUI abstracts the native UI frameworks of each target platform. When you define your UI using XAML or C#, .NET MAUI translates these definitions into the corresponding native UI elements at runtime. For example:

<Button Text="Click Me" Clicked="OnButtonClicked" />

This XAML element will be rendered as a native Button on Android, a UIButton on iOS and macOS, and a Button on Windows.

Getting Started

To start building your first .NET MAUI application, you'll need to have the .NET SDK installed, along with the .NET MAUI workload. You can install the workload using the .NET CLI:

dotnet workload install maui

Then, you can create a new project using Visual Studio or the .NET CLI.

Important: .NET MAUI is the recommended way to build cross-platform applications with .NET. It replaces Xamarin.Forms and offers significant improvements in performance, architecture, and developer experience.

Common Scenarios

Conclusion

.NET MAUI empowers developers to create beautiful, high-performance native applications for a wide range of platforms from a single code base. Its modern architecture, extensive features, and deep integration with the .NET ecosystem make it an excellent choice for cross-platform development.