public AttachPoint Attach(AttachDirection direction, ConnectionViewModel connection, NodeBaseViewModel associatedControl)
        {
            AttachPoint attachPoint = new AttachPoint(direction, connection, associatedControl);

            attachPoint.DirectionChanging += attachPoint_DirectionChanging;
            AttachPoints[direction].Add(attachPoint);
            UpdateAttachPoints();
            return(attachPoint);
        }
 public void Detach(AttachPoint ap)
 {
     AttachPlacement.Detach(ap);
 }
 public void Detach(AttachPoint point)
 {
     AttachPoints[point.Side].Remove(point);
     point.DirectionChanging -= attachPoint_DirectionChanging;
     UpdateAttachPoints();
 }
 void attachPoint_DirectionChanging(AttachPoint ap, AttachDirection direction)
 {
     AttachPoints[ap.Side].Remove(ap);
     AttachPoints[direction].Add(ap);
     //UpdatePoints();
 }