Skip to main content

BuilderFactoryExtensions.BootstrapMenu(BuilderFactory) Method

Creates a Menu control.

Namespace: DevExpress.AspNetCore

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

Declaration

public static BootstrapMenuBuilder BootstrapMenu(
    this BuilderFactory builderFactory
)

Parameters

Name Type Description
builderFactory BuilderFactory

A BuilderFactory object providing access to Menu settings.

Returns

Type Description
BootstrapMenuBuilder

A builder for a Menu 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 a Menu control.

@(Html.DevExpress()
    .BootstrapMenu()
    .ShowPopOutImages(true)
    .Items(items=> {
        items.Add().Text("Home").IconCssClass("fa fa-home")
            .Items(subItems => {
                subItems.Add().Text("News")
                    .Items(innerItems => {
                        innerItems.Add().Text("For Developers");
                        innerItems.Add().Text("Website news");
                    });
                subItems.Add()
                    .Text("Our Mission")
                    .BeginGroup(true);
                subItems.Add().Text("Our Customers");
            });
        items.Add().Text("Products")
            .Items(subItems => {
                subItems.Add().Text("Subscriptions / Packs");
                subItems.Add().Text(".NET Windows Forms Components");
                subItems.Add().Text("Reporting / Printing Suites");
                subItems.Add().Text("VCL Components and Tools");
                subItems.Add().Text("ASP.NET Components");
            });
        items.Add().Text("Support")
            .Items(subItems => {
                subItems.Add().Text("Knowledge Base");
                subItems.Add().Text("Documentation");
                subItems.Add().Text("Support Center");
                subItems.Add().Text("Newsgroups");
                subItems.Add().Text("Best Practicies");
            });
    }))
See Also