Overview of .NET MAUI
.NET Multi-platform App UI (.NET MAUI) is an open-source framework for creating native cross-platform applications for iOS, Android, macOS, and Windows with a single, shared C# codebase.
It's the evolution of Xamarin.Forms, providing a more modern, flexible, and performant way to build your cross-platform applications. .NET MAUI is built on .NET 6 and later, allowing you to leverage the latest advancements in the .NET ecosystem.
Key Concepts
Here are some of the core concepts you'll encounter when working with .NET MAUI:
- Single Project: .NET MAUI simplifies project structure by consolidating all your platform-specific code, resources, and shared code into a single project.
- Native UI: .NET MAUI renders controls that are mapped to native UI elements on each platform, ensuring a native look, feel, and performance.
- Cross-Platform APIs: Access platform-specific APIs through a unified C# interface, simplifying interaction with device features like the camera, GPS, and more.
- XAML: Declarative UI markup language that allows you to define your user interface separately from your application logic.
- MVVM Pattern: The Model-View-ViewModel architectural pattern is highly recommended for organizing your application code and promoting testability.
Core Features
Single Project Structure
Manage all your app code, resources, and platform specifics in one project for streamlined development.
Native Performance
Render controls using native UI elements for optimal performance and user experience on each platform.
Extensibility
Customize and extend existing controls, or create your own custom controls for unique UI requirements.
Modern .NET
Built on .NET 6 and later, benefiting from performance improvements, modern language features, and a rich ecosystem.
Platform APIs
Access device capabilities and platform-specific features through consistent C# APIs.
Developer Productivity
Features like Hot Reload and a streamlined build process enhance the developer experience.
When to Use .NET MAUI
.NET MAUI is an excellent choice for:
- Developing native mobile applications for iOS and Android from a single codebase.
- Building desktop applications for Windows and macOS alongside mobile apps.
- Migrating existing Xamarin.Forms applications to a more modern framework.
- Developers who are comfortable with C# and the .NET ecosystem and want to build cross-platform UIs.
Next Steps
To get started with .NET MAUI, you can:
- Follow the Getting Started guide to set up your development environment.
- Explore the built-in controls available in .NET MAUI.
- Learn about data binding to connect your UI to your data.