Introduction
Welcome to the .NET Multi-platform App UI (MAUI) getting started guide. MAUI enables you to create native mobile and desktop apps with a single shared codebase. In this tutorial series you'll learn how to set up your development environment, create your first app, and explore the core concepts of MAUI.
What is .NET MAUI?
.NET MAUI extends the capabilities of Xamarin.Forms and provides a unified framework for building cross‑platform UIs with .NET and C#. It abstracts the platform differences, letting you focus on the user experience while reusing most of your code across iOS, Android, macOS, and Windows.
Key Features
- Single project structure
- Hot Reload and Live Reload
- Native UI controls
- Cross‑platform graphics and animations
- Built‑in MVU (Model‑View‑Update) support
First Example – Hello, MAUI!
The following sample creates a simple app that displays "Hello, MAUI!" on the screen.
using Microsoft.Maui;
using Microsoft.Maui.Controls;
namespace HelloMaui
{
public class MainPage : ContentPage
{
public MainPage()
{
Content = new Label
{
Text = "Hello, MAUI!",
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
FontSize = 24
};
}
}
public class App : Application
{
public App() => MainPage = new MainPage();
}
public static class Program
{
public static void Main(string[] args)
{
MauiApp
.CreateBuilder()
.UseMauiApp()
.Build()
.Run(args);
}
}
}
Save the code in a Program.cs
file inside a new .NET MAUI project, then run dotnet build
and dotnet run
to launch the app on your chosen platform.
Next, continue to Setup your development environment to get the tools you need.