Skip to main content

GlobalOptions.SizeMode Property

Specifies DevExpress Blazor components’ size mode.

Namespace: DevExpress.Blazor.Configuration

Assembly: DevExpress.Blazor.v22.1.dll

Declaration

[DefaultValue(SizeMode.Small)]
public SizeMode SizeMode { get; set; }

Property Value

Type Default Description
SizeMode Small

A SizeMode enumeration value.

Available values:

Name Description
Small

Small size.

Medium

Medium size.

Large

Large size.

Remarks

Use the SizeMode global option to specify size mode for all resizable Blazor components whose size mode is not defined (set to NULL).

Do any of the following to specify this option:

  • Call the AddDevExpressBlazor(IServiceCollection, Action<GlobalOptions>) method.

    using DevExpress.Blazor;
    
    builder.Services.AddDevExpressBlazor(configure => configure.BootstrapVersion = BootstrapVersion.v5);
    
  • Call the services.Configure method that registers a configuration instance with the specified global option’s value.

    using DevExpress.Blazor;
    using DevExpress.Blazor.Configuration;
    
    builder.Services.Configure<GlobalOptions>((options) => options.BootstrapVersion = BootstrapVersion.v5);
    
  • Define the global option’s value in the appsettings.json file.

    { 
        "DevExpress": { 
            "BootstrapVersion": "v5" 
        } 
    } 
    

    Call the services.Configure method. Use the ConfigurationBinder.Bind method to register a configuration instance with the specified global option’s value.

    using DevExpress.Blazor;
    using DevExpress.Blazor.Configuration;
    
    builder.Services.Configure<GlobalOptions>(options => builder.Configuration.Bind("DevExpress", options));
    

For more information, refer to Size Modes.

See Also