New MAUI support and templates
.NET MAUI (Multi-platform App UI) is a cross-platform framework for building native mobile and desktop applications. It is an evolution of the Xamarin.Forms framework and is part of the .NET ecosystem. .NET MAUI allows developers to write code once and deploy it on multiple platforms, including iOS, Android, Windows, and more.
Here are some key features and concepts with .NET MAUI:
- Cross-Platform Development: .NET MAUI enables developers to write a single codebase in C# and XAML (or in some cases, with Blazor for web-based components) and target multiple platforms. This significant association only reduces the development effort required for building apps for different operating systems.
- Single Project Structure: .NET MAUI uses a single project structure for all platforms, eliminating the need for separate projects for each platform. This simplifies the development process and maintenance.
- Platform-Specific Customization: While sharing most of the code, .NET MAUI allows developers to implement platform-specific customizations when necessary. This ensures that the app’s user interface and functionality can adapt to the unique characteristics of each platform.
- .NET 7 Integration: .NET MAUI is closely integrated with .NET 7, the latest stable version of the .NET framework. This provides access to a wide range of libraries, tools, and features within the .NET ecosystem.
- XAML for UI: .NET MAUI uses XAML (eXtensible Application Markup Language) for defining the user interface. XAML is a markup language that allows developers to define the structure and appearance of the UI declaratively.
- MVVM (Model-View-ViewModel) Pattern: .NET MAUI encourages using the MVVM pattern to separate the application’s logic from its user interface. This promotes the maintainability and testability of the code.
- Hot Reload: .NET MAUI includes a hot reload feature that allows developers to make changes to their code or UI and see the results instantly in the running application without the need to rebuild or redeploy.
- Accessibility: Accessibility features are built into .NET MAUI, making it easier for developers to create inclusive apps that can be used by individuals with disabilities.
- Community and Ecosystem: .NET MAUI benefits from the existing .NET and Xamarin developer communities and ecosystems, which means access to a wealth of libraries, tools, and resources.
For further details about the MAUI platform, I recommend reading more here.
New MAUI Template
In this new Evergine release, you’ll discover a brand-new MAUI template project available through the Evergine Launcher.
Once you’ve created an Evergine project using this new template, you can easily generate a single MAUI profile project that can be compiled and deployed across Windows, Android, and iOS platforms.
To access the MAUI solution, simply open it from the “File” menu in Evergine Studio.
Upon launching the MAUI solution in Visual Studio, you’ll find two projects integrated into the solution. The first one is your Evergine project, while the other is the MAUI project, which references the Evergine project.
Within the MAUI project, you’ll locate the “Platform” folder, containing platform-specific resources such as the Android Manifest and Info.plist files. Meanwhile, in the Evergine folder, you’ll discover the EvergineView control. This control can be seamlessly added to your XAML pages, allowing you to incorporate an Evergine canvas for rendering your 3D scenes.
To deploy your project on different platforms, simply use the “Run/Deploy” button in Visual Studio. Keep in mind that for iOS deployment, you’ll need to connect your Visual Studio to a Mac and have an iOS device (iPad or iPhone) connected to your Mac.
After deploying your project within your MAUI solution, you’ll achieve results similar to the example shown above. This demonstrates a basic XAML page in MAUI featuring a Label and an EvergineView. While this serves as a sample, you have the creative freedom to craft extraordinary projects using the latest .NET technologies and Evergine.
The current MAUI template use .net7 stable version. After the .net8 stable version is released in November by Microsoft, we will update the MAUI template to .net8 stable version to be available use the latest improvement and features.