Skip to main content

MauiAppBuilderExtensions.UseDevExpress(MauiAppBuilder, Boolean) Method

Registers handlers for DevExpress .NET MAUI Controls and specifies whether to use the predefined localization resources in your application.

Namespace: DevExpress.Maui

Assembly: DevExpress.Maui.Core.dll

NuGet Package: DevExpress.Maui.Core

Declaration

public static MauiAppBuilder UseDevExpress(
    this MauiAppBuilder builder,
    bool useLocalization = false
)

Parameters

Name Type Description
builder MauiAppBuilder

The MAUI application builder.

Optional Parameters

Name Type Default Description
useLocalization Boolean False

true to use the predefined localization resources in the application; otherwise, false. Refer to the following topic for more information: Localization.

Returns

Type Description
MauiAppBuilder

The MAUI application builder with the initialized DevExpress .NET MAUI Controls.

Remarks

The following code sample initializes the DevExpress .NET MAUI Controls:

using DevExpress.Maui;

namespace EditorsExample;

public static class MauiProgram {
    public static MauiApp CreateMauiApp() {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .UseDevExpress()
            .ConfigureFonts(fonts => {
                fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                fonts.AddFont("univia-pro-regular.ttf", "Univia-Pro");
                fonts.AddFont("roboto-bold.ttf", "Roboto-Bold");
                fonts.AddFont("roboto-regular.ttf", "Roboto");
            });
        return builder.Build();
    }
}
See Also