MAUI Project Structure
Explore the structure of a .NET MAUI project including platform-specific entry points, key files like MauiProgram.cs, App.xaml, MainPage.xaml, and the organization of resources and project configuration. Understand how these components work together to enable cross-platform app development.
We'll look at the default structure of a .NET MAUI project that gets generated when creating a new project from the .NET MAUI template. The complete project is found in the code playground below. Android is set as its built target, as specified on line 4 of the MauiApp1.csproj file.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>Application entry points
In MAUI, each entry point is platform specific. All of them can be found inside the Platforms folder. If we expand this folder, we can find a subfolder representing each supporting platform we can build our application for. In the default project template, the Platforms folder includes the following project-specific folders:
Android...