Skip to main content

BuilderFactoryExtensions.BootstrapAccordion(BuilderFactory, String) Method

Creates an Accordion control with a specified name.

Namespace: DevExpress.AspNetCore

Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll

Declaration

public static BootstrapAccordionBuilder BootstrapAccordion(
    this BuilderFactory builderFactory,
    string name
)

Parameters

Name Type Description
builderFactory BuilderFactory

A BuilderFactory object providing access to Accordion settings.

name String

A control name.

Returns

Type Description
BootstrapAccordionBuilder

A builder for an Accordion control.

Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

The code sample below demonstrates how you can use this method to create an Accordion control.

@(Html.DevExpress()
    .BootstrapAccordion("accordionDefault")
    .Groups(groups => {
        groups.Add().Text("Tables")
        .Items(items => {
            items.Add()
                .Text("Users")
                .IconCssClass("fa fa-user");
            items.Add()
                .Text("Tasks")
                .IconCssClass("fa fa-tasks");
            items.Add()
                .Text("Scheduler")
                .IconCssClass("fa fa-calendar");
        });
        groups.Add().Text("Analysis")
         .Items(items => {
             items.Add()
                 .Text("Dashboard")
                 .IconCssClass("fa fa-dashboard");
             items.Add()
                 .Text("KPI")
                 .IconCssClass("fa fa-percent");
         });
    })
)
See Also