An entry point is where an application begins execution. Regular C# programs usually start in a static Main method, while .NET MAUI starts through CreateMauiApp in MauiProgram.cs. section 2.3
A .NET MAUI startup flow proceeds through these components:
- CreateMauiApp builds and returns a MauiApp with the generic host builder. section 2.3
- UseMauiApp<App>() connects the host builder to the App application class. section 2.3
- The App constructor assigns a Page, commonly MainPage, to the MainPage member. section 2.3
- The platform-specific entry points for Android, iOS, and macOS initiate this regular execution flow. section 2.3
Startup flow
MauiProgram.CreateMauiApp() builds the application, UseMauiApp<App>() launches the App class, and App assigns new MainPage() to its MainPage member for display. section 2.3
Figure 2.13 In a .NET MAUI app, MauiProgram is the entry point, which launches App, which displays MainPage.
Trace the compact sequence from MauiProgram as the entry point to App and then the displayed MainPage. section 2.3









