protected override void InitDiagram() { base.InitDiagram(); // Create a group NGroup group = new NGroup(); m_DrawingDocument.Content.ActivePage.Items.Add(group); group.PinX = 300; group.PinY = 300; // Create some shapes and add them to the group NBasicShapeFactory factory = new NBasicShapeFactory(); NShape root = factory.CreateShape(ENBasicShape.Rectangle); root.Text = "Root"; group.Shapes.Add(root); NShape shape1 = factory.CreateShape(ENBasicShape.Circle); shape1.Text = "Circle 1"; group.Shapes.Add(shape1); NShape shape2 = factory.CreateShape(ENBasicShape.Circle); shape2.Text = "Circle 2"; group.Shapes.Add(shape2); NShape shape3 = factory.CreateShape(ENBasicShape.Circle); shape3.Text = "Circle 3"; group.Shapes.Add(shape3); // Connect the shapes ConnectShapes(root, shape1); ConnectShapes(root, shape2); ConnectShapes(root, shape3); // Update group bounds group.UpdateBounds(); // Create a layout context and configure the area you want the group to be arranged in. // The layout area is in page coordinates NDrawingLayoutContext layoutContext = new NDrawingLayoutContext(m_DrawingDocument, group); layoutContext.LayoutArea = new NRectangle(100, 100, 200, 200); // Layout the shapes in the group NRadialGraphLayout layout = new NRadialGraphLayout(); layout.Arrange(group.Shapes.ToArray(), layoutContext); // Update the group bounds group.UpdateBounds(); }