liveBook · Manning

Application

As explained in .NET MAUI in Action

Application is the .NET MAUI base class representing the root application object and its application-level state.

Application is the .NET MAUI base class for the root application object and application-level state. An App class inherits Application and implements IApplication, allowing UseMauiApp<App>() to launch it from MauiProgram. section 2.3

The App constructor initializes the application and assigns a Page to its MainPage member. .NET MAUI displays that page after loading, making MainPage the practical starting view. section 2.3

Set the initial page

public partial class App : Application { public App() { InitializeComponent(); MainPage = new MainPage(); } } The startup flow is CreateMauiApp → UseMauiApp<App>() → App → MainPage. section 2.3

How .NET MAUI in Action covers it

How deep it goes
Explains inheritance, interface implementation, constructor setup, and MainPage assignment, while deferring broader lifecycle details.
Examples
Uses App.xaml.cs, UseMauiApp<App>(), MainPage = new MainPage(), and a startup-flow diagram.
What it assumes
Assumes a generated .NET MAUI project containing MauiProgram.cs and an App class.
What you can do after
Builds a .NET MAUI app startup path by deriving App from Application and assigning an initial Page.
How it connects
Connects Application with MauiProgram, CreateMauiApp, IApplication, Page, ContentPage, and MainPage.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.