Recently, Microsoft officially announced that .NET MAUI has been officially GA.
“One codebase, many platforms. Over 5 million .NET developers now have a best-in-class cross-platform UI stack for Android, iOS, macOS and Windows, complementing the .NET Toolchain (SDK) and Base Class Library (BCL) .You can build anything with .NET."
According to Microsoft, this is just the beginning of a journey to create a desktop and mobile application experience that satisfies .NET developers, laying the foundation for the broader .NET ecosystem and integrating plugins, Libraries and services are introduced in .NET 6 and SDK style projects.
These include:
Let's take a look at the highlights of .NET MAUI.
Native UI out of the box
For different platforms (Android, iOS, macOS, and Windows), .NET MAUI provides the best app experience designed specifically to work right out of the box. For example, .NET MAUI on Windows is powered by WinUI 3, a native UI component that ships with the Windows Apps SDK.
Build apps using C# and XAML from a rich toolkit of over 40 controls, layouts, and pages. On the Xamarin shoulders of mobile controls, .NET MAUI adds support for multi-window desktop applications, menu bars and new animation features, borders, corners, shadows, graphics, and more.
Accessibility takes precedence
A major advantage of using a native UI is the inherited accessibility support that we can build upon with Semantic Services to make it easier to create highly accessible applications. .NET MAUI Semantic Services are used to control:
- Attributes such as description, prompt, and title level
- focus
- screen reader
- automation properties
Beyond the User Interface
.NET MAUI provides simple APIs to access each platform's services and features, such as accelerometers, application operations, file systems, notifications, and more. In the example below, a menu option can be added to the app icon on each platform by configuring "app actions":
Easy to customize
Whether extending the functionality of .NET MAUI controls or building new platform capabilities, .NET MAUI is designed for extensibility. Take a control as an example, which is a typical example of a control that renders different effects in different ways on one platform. Android draws an underline below the text field, and developers often want to remove the underline. With .NET MAUI, you can customize everything in your entire project with just a few lines of code.
Modern development productivity
.NET MAUI uses C# 10 features introduced in .NET 6, including the global use statement and file-scoped namespaces, which are great for reducing clutter in your files. .NET MAUI takes multi-platform targeting to the next level with a "single project" focus.
In the new .NET MAUI project, the platform is placed in a subfolder and developers can focus on the application that spends the most effort. In the project's Resources folder, developers can manage the application's fonts, images, application icons, splash screens, raw resources, and styles in one place. .NET MAUI will be optimized for the unique requirements of each platform.
Bringing Blazor to Desktop and Mobile
.NET MAUI integrates with Blazor so developers can reuse existing Blazor Web UI components directly in native mobile and desktop applications. With .NET MAUI and Blazor, developers can reuse web development skills to build cross-platform native client-side applications and build UI-consistent apps across mobile, desktop, and web
performance optimization
.NET MAUI is designed for performance. UI controls in .NET MAUI implement a stripped-down handler mapper pattern over native platform controls. This reduces the number of layers in UI rendering and simplifies control customization. Layouts in .NET MAUI have been designed to use a consistent manager pattern that optimizes measures and arranges loops for faster UI rendering and updating.
These settings are enabled by default to provide these optimizations for release builds.
See more details: https://devblogs.microsoft.com/dotnet/introducing-dotnet-maui-one-codebase-many-platforms/
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。