Skip to main content

GlobalOptions.SizeMode Property

Specifies DevExpress Blazor components’ size mode.

Namespace: DevExpress.Blazor.Configuration

Assembly: DevExpress.Blazor.v25.2.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Default Description
SizeMode Medium

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 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.SizeMode = DevExpress.Blazor.SizeMode.Small);
    
  • 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.SizeMode = SizeMode.Small);
    
  • Define the global option’s value in the appsettings.json file.

    { 
        "DevExpress": { 
            "SizeMode": "Small" 
        } 
    } 
    

    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 additional information, refer to Size Modes.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SizeMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also