The requested page is not available for the requested platform. You are viewing the content for Default platform.

BuilderFactoryExtensions.BootstrapMenu(BuilderFactory, String) Method

Creates a Menu control with a specified name.

Namespace: DevExpress.AspNetCore

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

Declaration

public static BootstrapMenuBuilder BootstrapMenu(
    this BuilderFactory builderFactory,
    string name
)
<ExtensionAttribute>
Public Shared Function BootstrapMenu(
    builderFactory As BuilderFactory,
    name As String
) As BootstrapMenuBuilder

Parameters

Name Type Description
builderFactory BuilderFactory

A BuilderFactory object providing access to Menu settings.

name String

A control name.

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("menuDefault")
    .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