MauiAppBuilder Class

Definition

A builder for .NET MAUI cross-platform applications and services.

public sealed class MauiAppBuilder
Inheritance
MauiAppBuilder

Properties

Configuration

A collection of configuration providers for the application to compose. This is useful for adding new configuration sources and providers.

Logging

A collection of logging providers for the application to compose. This is useful for adding new logging providers.

Services

A collection of services for the application to compose. This is useful for adding user provided or framework provided services.

Methods

Extension Methods

UseMauiCompatibility(MauiAppBuilder)
UseMauiEmbeddedApp<TApp>(MauiAppBuilder, Func<IServiceProvider,TApp>)

Configures the MauiAppBuilder to use the specified TApp as the embedded application type.

UseMauiEmbeddedApp<TApp>(MauiAppBuilder)

Configures the MauiAppBuilder to use the specified TApp as the embedded application type.

ConfigureEffects(MauiAppBuilder, Action<IEffectsBuilder>)
UseMauiApp<TApp>(MauiAppBuilder, Func<IServiceProvider,TApp>)

Configures the MauiAppBuilder to use the specified TApp as the main application type.

UseMauiApp<TApp>(MauiAppBuilder)

Configures the MauiAppBuilder to use the specified TApp as the main application type.

UseMauiMaps(MauiAppBuilder)

Configures MauiAppBuilder to add support for the Map control.

UseMauiEmbedding<TApp>(MauiAppBuilder, Func<IServiceProvider,TApp>)
UseMauiEmbedding<TApp>(MauiAppBuilder)
UseFoldable(MauiAppBuilder)
ConfigureAnimations(MauiAppBuilder)
ConfigureDispatching(MauiAppBuilder)
ConfigureEssentials(MauiAppBuilder, Action<IEssentialsBuilder>)
ConfigureFonts(MauiAppBuilder, Action<IFontCollection>)

Configures the MauiAppBuilder with a specified delegate configureDelegate to register fonts in the application.

ConfigureFonts(MauiAppBuilder)

Configures the MauiAppBuilder with fonts.

ConfigureMauiHandlers(MauiAppBuilder, Action<IMauiHandlersCollection>)
ConfigureImageSources(MauiAppBuilder, Action<IImageSourceServiceCollection>)
ConfigureImageSources(MauiAppBuilder)
ConfigureLifecycleEvents(MauiAppBuilder, Action<ILifecycleBuilder>)

Applies to

Product Versions
.NET MAUI 8, 9