public static GrowableNode Create(IElementCreateInfo elementCreateInfo) { var node = new GrowableNode(); node.Init(elementCreateInfo); return(node); }
protected override void ModifyNewDocument(Envoy envoy) { var diagramDefinition = envoy.ReferenceDefinition as ExampleDiagramDefinition; if (diagramDefinition != null) { using (var transaction = diagramDefinition.TransactionManager.BeginTransaction("Drop Some Nodes", TransactionPurpose.NonUser)) { for (int i = 0; i < 4; i++) { var node = GrowableNode.Create(new ElementCreateInfo()); node.Bounds = new SMRect(i * 75 + 100, i * 75 + 100, 50, 50); diagramDefinition.RootDiagram.AddNode(node); } transaction.Commit(); } } }