Skip to main content
A newer version of this page is available. .

MVCxDiagramToolboxShapeCollection.Add() Method

Creates a new shape and adds it to the collection.

Namespace: DevExpress.Web.Mvc

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

NuGet Package: DevExpress.Web.Mvc5

Declaration

public DiagramToolboxShape Add()

Returns

Type Description
DiagramToolboxShape

The newly created shape.

Remarks

@Html.DevExpress().Diagram(settings => {
  settings.Name = "Diagram";
    var shape1 = settings.SettingsContextToolbox.Shapes.Add();
    shape1.Type = DiagramShapeType.VerticalContainer;
    var shape2 = settings.SettingsContextToolbox.Shapes.Add();
    shape2.Type = DiagramShapeType.HorizontalContainer;
    ...
}).GetHtml()
See Also