DEV Community

Cover image for What is MAUI?
Mazi Vincent Esomchi
Mazi Vincent Esomchi

Posted on

What is MAUI?

.NET Multi-platform App UI (.NET MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML.
Using .NET MAUI, you can develop apps that can run on Android, iOS, macOS, and Windows from a single shared codebase.

Instead of different projects for desktop, mobile, and each OS, all your code is in a single project. .NET MAUI also provides hosting Blazor in MAUI, with embedded web view controls to run Razor components natively on your target device. The decoupled UI and single project enable you to stay focused on one application instead of juggling the unique needs of multiple platforms. It’s the new baby of Microsoft and I know there will be more libraries and the broader ecosystem come alongside .NET MAUI in the following months.

Image description

*Who .NET MAUI is for? *
.NET MAUI is for developers who want to:

  • Write cross-platform apps in XAML and C#, from a single shared codebase in Visual Studio.
  • Share UI layout and design across platforms.
  • Share code, tests, and business logic across platforms.

Single project for different platforms
In new .NET MAUI projects, platforms are placed in a subfolder that gives your focus to your application. Within your project’s Resources folder, you have a single place to manage your fonts, images, app icon, splash screen, raw assets, and styling. .NET MAUI will do the work to optimize them for each platform’s unique requirements.

Cross-platform APIs for device features
.NET MAUI provides cross-platform APIs for native device features. Examples of functionality provided by .NET MAUI for accessing device features includes:

  • Access to sensors, such as the accelerometer, compass, and gyroscope on devices.
  • Ability to check the device's network connectivity state, and detect changes.
  • Provide information about the device the app is running on.
  • Copy and paste text to the system clipboard, between apps.
  • Pick single or multiple files from the device.
  • Store data securely as key/value pairs.
  • Utilize built-in text-to-speech engines to read text from the device.
  • Initiate browser-based authentication flows that listen for a call-back to a specific app registered URL.

Hot reload
.NET MAUI includes support for .NET hot reload, which enables you to modify your managed source code while the app is running, without the need to manually pause or hit a breakpoint. Then, your code edits can be applied to your running app without recompilation.

.NET MAUI also includes support for XAML hot reload, which enables you to save your XAML files and see the changes reflected in your running app without recompilation. In addition, your navigation state and data will be maintained, enabling you to quickly iterate on your UI without losing your place in the app.

Will you Learn MAUI?

Top comments (0)