Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DevExpressServiceCollectionExtensions Class

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

Namespace: Microsoft.Extensions.DependencyInjection

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
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 following code snippet sets the BootstrapVersion global option to v5:

using DevExpress.Blazor;

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

The AddDevExpressBlazor method returns an object that you can use to further configure internal DevExpress Blazor services. For instance, you can call the AddSpellCheck method to add and configure the Rich Text Editor‘s built-in spell check service:

using DevExpress.Blazor;

/* ... */
builder.Services.AddDevExpressBlazor().AddSpellCheck();

#Inheritance

Object
DevExpressServiceCollectionExtensions
See Also