Back to Devexpress

GlobalOptions.BootstrapVersion Property

blazor-devexpress-dot-blazor-dot-configuration-dot-globaloptions-eeec1ed5.md

latest6.1 KB
Original Source

GlobalOptions.BootstrapVersion Property

OBSOLETE

This property is obsolete now.

Specifies the Bootstrap version.

Namespace : DevExpress.Blazor.Configuration

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(BootstrapVersion.v5)]
[Obsolete("This property is obsolete now.")]
public BootstrapVersion BootstrapVersion { get; set; }

Property Value

TypeDefaultDescription
BootstrapVersionv5

A BootstrapVersion enumeration value.

|

Available values:

NameDescription
v4

Bootstrap v4

| | v5 |

Bootstrap v5

|

Remarks

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:

Bootstrap Version in DevExpress Templates

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).

Bootstrap Version in Microsoft Templates

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).

Set up the BootstrapVersion Property Explicitly

Do any of the following:

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

csharp
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

csharp
builder.Services.AddDevExpressBlazor(options => { options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5; });
builder.Services.AddMvc();

blazor-charts-create-pie-chart/CS/DxBlazorPieChartApp/Program.cs#L14

csharp
builder.Services.Configure<DevExpress.Blazor.Configuration.GlobalOptions>(options => {
    options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5;
});

blazor-grid-filter-operator-selector/CS/DxGridFilterOperatorSelector/Program.cs#L14

csharp
builder.Services.Configure<DevExpress.Blazor.Configuration.GlobalOptions>(options => {
    options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5;
});

blazor-layout-implement-cardview/CS/DxBlazorApplication5/Program.cs#L13

csharp
builder.Services.Configure<DevExpress.Blazor.Configuration.GlobalOptions>(options => {
    options.BootstrapVersion = DevExpress.Blazor.BootstrapVersion.v5;
});

See Also

GlobalOptions Class

GlobalOptions Members

DevExpress.Blazor.Configuration Namespace