1、Diagram中插入一个形状的方法:
DiagramShape diagramShape = new DiagramShape();//新建一个形状对象
diagramShape.Shape = DevExpress.Diagram.Core.BasicShapes.Rectangle;//赋值为一个基础图形:矩形
diagramShape.ConnectionPoints = new PointCollection(new List<PointFloat> { new PointFloat(0.5f, 0.5f) });//为形状设置连接点
//如果想进入用户绘制模式时
//方法1:
SelectedDiagram.Commands.Execute(DiagramCommands.SelectRectangleToolCommand);
//方法2:
BeginInvoke((Action)(() => SelectedDiagram.Commands.Execute(DiagramCommands.SelectRectangleToolCommand)));
标签:常用,DevExpress,0.5,diagramShape,Diagram,new,方法 From: https://www.cnblogs.com/east115/p/17492252.html