You can use the CalculatePoints method I wrote about above.
Simple example for you:
protected override System.Collections.ArrayList CalculatePoints() {
// calculate only when the elements are already placed
if (Line.Model.IsArranged) {
ArrayList al = new ArrayList(2);
if (Line.Start.Arrangement == Arrangement.Horizontal) {
// one point just below the start element (in the middle)
al.Add(new PointF(Line.Start.X
+ Line.Start.Width / 2, Line.Start.Y
+ Line.Start.Height + Line.Model.ElementPadding.Height));
// and one just above the end element (in the middle as well)
al.Add(new PointF(Line.End.X
+ Line.Start.Width / 2,
Line.End.Y - Line.Model.ElementPadding.Height));
}
else if (Line.Start.Arrangement == Arrangement.Vertical) {
al.Add(new PointF(Line.Start.X+Line.Model.Indent / 2.0F,
Line.Start.Y + Line.Start.Height + Line.Model.ElementPadding.Height));
al.Add(new PointF(Line.Start.X+Line.Model.Indent / 2.0F,
Line.End.Y + Line.End.Height / 2));
}
return al;
}
else {
return base.CalculatePoints();
}
}
You have to override the Connector class with your own, place the code above in it and make sure the diagram will use your class, not the original Connector by overriding the CreateConnector method in Runtime class.