public BasicShape AddShape(Point position, int id, int routeId, TemplateDot templateDot) { BasicShape shape = new BasicShape(templateDot, position, id, routeId); this.DiagramView.Children.Add(shape); return(shape); }
public ShapeConnectorBase AddConnection(BasicShape source, BasicShape target, int id, int routeId) { ShapeConnectorBase conn = new ShapeConnectorBase(); conn.SetBinding(ShapeConnectorBase.StartPointProperty, CreateConnectorBinding((IConnectable)target)); conn.SetBinding(ShapeConnectorBase.EndPointProperty, CreateConnectorBinding((IConnectable)source)); conn.StartDot = target; conn.EndDot = source; conn.SetToolTip(); conn.ConnectorId = id; conn.RouteId = routeId; this.DiagramView.Children.Insert(0, conn); return(conn); }
public void RemoveShape(BasicShape removingShape) { this.DiagramView.Children.Remove(removingShape); }
public BasicShape AddShape(BasicShape shape) { this.DiagramView.Children.Add(shape); return(shape); }