alexa
menu

Blazor Toolkit

    Show / Hide Table of Contents

    Class SyncfusionBlazorToolkit

    Extension methods for registering Syncfusion Blazor Toolkit services into the dependency injection container.

    Inheritance
    System.Object
    SyncfusionBlazorToolkit
    Namespace: Syncfusion.Blazor.Toolkit
    Assembly: Syncfusion.Blazor.Toolkit.dll
    Syntax
    public static class SyncfusionBlazorToolkit : Object

    Methods

    AddSyncfusionBlazorToolkit(IServiceCollection, Action<GlobalOptions>)

    Registers Syncfusion Blazor Toolkit services into the dependency injection container, including localization, the SyncfusionBlazorToolkitService, and optional global configuration.

    Declaration
    public static IServiceCollection AddSyncfusionBlazorToolkit(this IServiceCollection services, Action<GlobalOptions> configure = null)
    Parameters
    Type Name Description
    Microsoft.Extensions.DependencyInjection.IServiceCollection services

    The service collection to add services to.

    System.Action<Syncfusion.Blazor.Toolkit.GlobalOptions> configure

    Optional action to configure Syncfusion.Blazor.Toolkit.GlobalOptions.

    Returns
    Type Description
    Microsoft.Extensions.DependencyInjection.IServiceCollection

    The updated Microsoft.Extensions.DependencyInjection.IServiceCollection.

    Remarks

    This method is intended to be called in Program.cs or Startup.cs during application initialization. It registers SyncfusionBlazorToolkitService as a scoped service and sets up the Microsoft.Extensions.Localization.IStringLocalizerFactory for component localization.

    Examples
    var builder = WebApplication.CreateBuilder(args);
    builder.Services.AddSyncfusionBlazorToolkit(options =>
    {
        options.EnableRtl = true;
        options.Animation = GlobalAnimationMode.Enable;
    });
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved