Skip to main content

MVCxDiagramToolboxSettings.Groups Property

Lists toolbox groups.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v23.2.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public MVCxDiagramToolboxGroupCollection Groups { get; }

Property Value

Type Description
MVCxDiagramToolboxGroupCollection

A collection of toolbox groups.

Property Paths

You can access this nested property as listed below:

Object Type Path to Groups
DiagramSettings
.SettingsToolbox .Groups

Remarks

Use the Groups property to specify shape groups that are visible in the toolbox.

If the Groups collection is not specified, the default groups are visible.

@Html.DevExpress().Diagram(settings => {
    settings.Name = "Diagram";
        settings.SettingsToolbox.Groups.Add(g => {
        g.Category = DevExpress.Web.ASPxDiagram.DiagramShapeCategory.General;
    });
    settings.SettingsToolbox.Groups.Add(g => {
        g.Category = DevExpress.Web.ASPxDiagram.DiagramShapeCategory.Custom;
        g.CustomCategoryName = "hardware";
        g.Title = "Hardware";
    });
    settings.CustomShapes.Add(c => {
        c.Type = "internet";
        c.Category = "hardware";
        c.Title = "Internet";
    ...

}).Import(Model).GetHtml()

Run Demo: Custom Shapes

See Also