MVCxDiagramToolboxShapeCollection.Add(Action<DiagramToolboxShape>) Method
In This Article
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
NuGet Package: DevExpress.Web.Mvc5
#Declaration
public void Add(
Action<DiagramToolboxShape> method
)
#Parameters
Name | Type | Description |
---|---|---|
method | Action<Diagram |
A delegate method that accepts the created Diagram |
#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