Skip to main content

MVCxDiagramToolboxShapeCollection.Add(Action<DiagramToolboxShape>) Method

Adds a new shape to the collection and allows you to customize the shape in a delegate method implementation.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public void Add(
    Action<DiagramToolboxShape> method
)

Parameters

Name Type Description
method Action<DiagramToolboxShape>

A delegate method that accepts the created DiagramToolboxShape as a parameter.

Remarks

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