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.2.dll
Declaration
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