Skip to main content
A newer version of this page is available. .

DevExpressServiceCollectionExtensions Class

Contains extension methods to configure an IServiceCollection for DevExpress Blazor components.

Namespace: Microsoft.Extensions.DependencyInjection

Assembly: DevExpress.Blazor.v21.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public static class DevExpressServiceCollectionExtensions

Remarks

Use the AddDevExpressBlazor(IServiceCollection, Action<GlobalOptions>) method to add internal DevExpress Blazor services to the service collection or specify DevExpress Blazor components’ global options.

Call this method in the Program.cs file to register internal DevExpress Blazor services. Pass global option values to this method to set options that apply to all DevExpress Blazor components.

The example below sets the BootstrapVersion global option to v5:

using DevExpress.Blazor;

/* ... */
builder.Services.AddDevExpressBlazor(configure => configure.BootstrapVersion = BootstrapVersion.v5);

Inheritance

Object
DevExpressServiceCollectionExtensions
See Also