Share via


IPlatformApplication.Application Property

Definition

Gets the .NET MAUI application instance.

public:
 property Microsoft::Maui::IApplication ^ Application { Microsoft::Maui::IApplication ^ get(); };
public Microsoft.Maui.IApplication Application { get; }
member this.Application : Microsoft.Maui.IApplication
Public ReadOnly Property Application As IApplication

Property Value

An IApplication instance representing the current MAUI application.

Examples

// Accessing the main page from the application
var mainPage = platformApp.Application.MainPage;

// Triggering application lifecycle events
if (platformApp.Application is Application app)
{
    app.OnStart();
}

Remarks

This property provides access to the main MAUI application instance, which contains application-level configuration, the main page, and application lifecycle methods. Use this to access application-wide properties and methods.

Applies to