blazor-devexpress-dot-blazor-dot-configuration-dot-globaloptions-eeec1ed5.md
This property is obsolete now.
Specifies the Bootstrap version.
Namespace : DevExpress.Blazor.Configuration
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(BootstrapVersion.v5)]
[Obsolete("This property is obsolete now.")]
public BootstrapVersion BootstrapVersion { get; set; }
| Type | Default | Description |
|---|---|---|
| BootstrapVersion | v5 |
A BootstrapVersion enumeration value.
|
Available values:
| Name | Description |
|---|---|
| v4 |
Bootstrap v4
| | v5 |
Bootstrap v5
|
Important
The BoostrapVersion global option and the corresponding BootstrapVersion enumeration are now obsolete. You no longer need to set up the BootstrapVersion property for your applications. If you create an application with a DevExpress Blazor project template, the AddDevExpressBlazor method only includes size mode configuration. Refer to the following breaking change for additional information: GlobalOption.BootstrapVersion is now obsolete.
The BootstrapVersion property allows you to specify the Bootstrap version for your application. Note that the Bootstrap version of the application and theme should match. Refer to the following topics for additional information:
When you use DevExpress project templates to create a Blazor application, the project contains a link to a DevExpress theme v5 (Pages/Layout.cshtml, wwwwroot/index.html, or Components/App.razor) and sets the BootstrapVersion global option to v5 (Program.cs).
When you use Microsoft project templates to create a Blazor application, the project contains a link to the standard Bootstrap theme v5 (Pages/Layout.cshtml, wwwwroot/index.html, or Components/App.razor) and sets the BootstrapVersion global option to v5 (Program.cs).
Do any of the following:
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.
The following code snippets (auto-collected from DevExpress Examples) contain references to the BootstrapVersion 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.
localize-devexpress-blazor-components/CS/DxBlazorLocalization/BlazorServer/Program.cs#L12
builder.Services.Configure<DevExpress.Blazor.Configuration.GlobalOptions>(options => {
options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5;
});
blazor-ai-chat-function-calling/CS/DXBlazorChatFunctionCalling.Semantic/Program.cs#L17
builder.Services.AddDevExpressBlazor(options => { options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5; });
builder.Services.AddMvc();
blazor-charts-create-pie-chart/CS/DxBlazorPieChartApp/Program.cs#L14
builder.Services.Configure<DevExpress.Blazor.Configuration.GlobalOptions>(options => {
options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5;
});
blazor-grid-filter-operator-selector/CS/DxGridFilterOperatorSelector/Program.cs#L14
builder.Services.Configure<DevExpress.Blazor.Configuration.GlobalOptions>(options => {
options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5;
});
blazor-layout-implement-cardview/CS/DxBlazorApplication5/Program.cs#L13
builder.Services.Configure<DevExpress.Blazor.Configuration.GlobalOptions>(options => {
options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5;
});
See Also