blazor-devexpress-dot-blazor-dot-configuration-dot-globaloptions.md
Specifies DevExpress Blazor components’ size mode.
Namespace : DevExpress.Blazor.Configuration
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(SizeMode.Medium)]
public SizeMode SizeMode { get; set; }
| Type | Default | Description |
|---|---|---|
| SizeMode | Medium |
A SizeMode enumeration value.
|
Available values:
| Name | Description |
|---|---|
| Small |
Small size.
| | Medium |
Medium size.
| | Large |
Large size.
|
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.
Call the services.Configure method that registers a configuration instance with the specified global option’s value.
Define the global option’s value in the appsettings.json file.
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.
blazor-gridlayout-create-adaptive-dashboard-layout/CS/DxGridLayoutAdaptivity.Wasm/Program.cs#L18
builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddDevExpressBlazor(configure => configure.SizeMode = DevExpress.Blazor.SizeMode.Small);
blazor-charts-update-chart-data-based-on-grid-focus/CS/Charts/Program.cs#L12
builder.Services.AddDevExpressBlazor(options => {
options.SizeMode = DevExpress.Blazor.SizeMode.Medium;
});
blazor-grid-detect-row-editing-cancellation/CS/ShowConfirmationDialog/Program.cs#L12
builder.Services.AddDevExpressBlazor(options => {
options.SizeMode = DevExpress.Blazor.SizeMode.Medium;
});
blazor-grid-bind-to-data-with-entity-framework-core/CS/Program.cs#L13
builder.Services.AddDevExpressBlazor(options => {
options.SizeMode = DevExpress.Blazor.SizeMode.Medium;
});
blazor-grid-custom-validation/CS/Program.cs#L12
builder.Services.AddDevExpressBlazor(options => {
options.SizeMode = DevExpress.Blazor.SizeMode.Medium;
});
See Also