Overview of .NET MAUI
Welcome to the documentation for .NET Multi-platform App UI (MAUI)! .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 is the evolution of Xamarin.Forms, providing a streamlined development experience for building apps that target Android, iOS, macOS, and Windows. It allows you to create rich, performant applications with a native look and feel on each platform.
Key Features
- Single Project Architecture: Manage all your platform-specific code, resources, and assets in a single project.
- Native UI: Render UI using native controls on each platform, ensuring a familiar user experience.
- Cross-Platform Reach: Target Android, iOS, macOS, and Windows from one codebase.
- Modern .NET: Built on the latest .NET platform, leveraging performance improvements and access to the vast .NET ecosystem.
- XAML and C#: Choose between declarative UI with XAML or imperative UI with C#.
- Extensibility: Easily extend and customize controls, and integrate with platform-specific APIs.
Getting Started
To begin building your first .NET MAUI application, you'll need to set up your development environment. This typically involves installing:
- Visual Studio 2022 with the .NET MAUI workload.
- The .NET SDK.
For detailed installation instructions and system requirements, please refer to the Get Started section.
Core Concepts
.NET MAUI applications are built around several core concepts:
Pages and Layouts
Pages represent a container for UI content. Common page types include ContentPage
, NavigationPage
, and TabbedPage
. Layouts are used to arrange child elements on a page. Examples include StackLayout
, Grid
, and FlexLayout
.
Controls
Controls are the building blocks of your application's UI. .NET MAUI provides a rich set of controls such as Button
, Label
, Entry
, Image
, and many more, which are rendered as native controls on each platform.
Data Binding
Data binding is a powerful mechanism that creates a connection between your UI elements and your data models. This allows UI elements to reflect data changes and user interactions to update data automatically, reducing boilerplate code.
MVVM Pattern
The Model-View-ViewModel (MVVM) pattern is a popular architectural pattern for building .NET MAUI applications. It promotes separation of concerns, making your code more maintainable, testable, and scalable.
Platform-Specific Functionality
While .NET MAUI aims for a single codebase, you can still access platform-specific APIs and features when needed, using techniques like platform-specific code or dependency injection.
Next Steps
Explore the following sections to deepen your understanding of .NET MAUI: