|
I am having trouble getting my links to orient properly. In the attached picture, I'm trying to drag a link from the bottom of the rectangle on the left (outgoing) into the left side of the trapezoid (incoming). I want the outgoing link to be vertical, and the incoming link to be horizontal.
Here is the code that sets up the anchor pattern for the rectangle:
AnchorPattern = new AnchorPattern { Points = new AnchorPointCollection(new AnchorPoint[] { Point(50, 0, Orientation.Vertical, true, true), Point(0, 50, Orientation.Horizontal, true, true), Point(100, 50, Orientation.Horizontal, true, true), Point(50, 100, Orientation.Vertical, true, true), Point(0, 25, Orientation.Horizontal, true, false), Point(0, 75, Orientation.Horizontal, true, false) })};
Here is the code that sets up the anchor pattern for the trapezoid:
AnchorPattern = new AnchorPattern { Points = new AnchorPointCollection(new AnchorPoint[] { Point(0, 25, Orientation.Horizontal, true, false), Point(0, 50, Orientation.Horizontal, true, false), Point(0, 75, Orientation.Horizontal, true, false), Point(100, 50, Orientation.Horizontal, false, true) })};
Here are some related settings on my diagram:
diagram.LinkCrossings = LinkCrossings.Arcs; diagram.LinkShape = LinkShape.Cascading; diagram.LinkRouter = new GridRouter(); diagram.AllowSplitLinks = true; diagram.Behavior = Behavior.DrawLinks; Attachment 1 is what the link looks like when I try to drag from the 50,100 point on the rectangle (marked as Vertical) to the 0,50 point on the trapezoid (marked as Horizontal).
I want the link to start vertical and end horizontal, and the opposite is happening. I can then force the link to look like I want, but it takes some work. Any idea how I can make this behave correctly?
|