.NET Multi-platform App UI (.NET MAUI) is a framework introduced by Microsoft to enable developers to create cross-platform applications for mobile and desktop operating systems using a single codebase. This framework extends the capabilities of Xamarin.Forms, providing a more unified and scalable approach to developing applications that can run on Android, iOS, macOS, and Windows. For further information on Xamarin.Forms, check out this learning path on Developing cross-platform applications with Xamarin.Forms .
With .NET MAUI, developers can leverage the full power of .NET to build interactive and performance-oriented applications. It supports modern development patterns and practices, including MVVM (Model-View-ViewModel), dependency injection, and async programming. The framework integrates seamlessly with Visual Studio, offering a rich development environment with tools for debugging, UI design, and deployment.
Similar to Windows Presentation Foundation (WPF) and Xamarin.Forms, .NET MAUI utilizes a mix of declarative UI (using XAML) and imperative code, allowing for flexible and expressive UI construction. Moreover, .NET MAUI incorporates platform-specific capabilities and access to native APIs, ensuring that applications can fully utilize the features of the underlying operating system.
In this learning path, you will explore how to create a .NET MAUI application and discover how .NET MAUI application performance is enhanced on Arm64 devices, particularly through the computationally intensive task of performing the multiply-add operation on two vectors. This operation, commonly used in many artificial neural network architectures, serves as an excellent example of Arm64’s capabilities in handling performance-demanding tasks.
You can find the complete project code used in this learning path here .
Before you begin the implementation, install Visual Studio 2022 with the following workloads:
Open Visual Studio and click ‘Create a new project’.
In the next window, search for the ‘.NET MAUI App’ template.
This will open the ‘Configure your new project’ view, in which you should configure the project as follows (refer to the figure below):
In the next window, select .NET 8.0 (Long Term Support) and click the Create button:
The project creation process may take a few moments. During this process, you might be prompted to enable Developer Mode for Windows. If so, follow the instructions shown to enable Developer Mode:
Then, accept any other license terms that appear, including the Android SDK - License Agreement.
Your project should be now ready. Next, open the Solution Explorer (View -> Solution Explorer) to view the created projects:
The .NET MAUI project template is structured to enable the development of cross-platform applications using a single codebase, targeting Android, iOS, macOS, and Windows. Therefore, the project we have just created contains the following elements:
You can now run the created application. To do so, click Debug/Start Debugging. The running application will look like the figure below: