Link Anchor - ReshapingTool


I am trying to create custom anchors for my links and I found this topic that helped me a lot, but I still have one problem. When I customize a link’s route using anchors in my diagram, everything works fine until I try to add a new link. Then the route that had been customized goes back to it’s previous state, it’s like the modifications that were made are cancelled.

I use the ReshapingTool class that you gave in that post. This behavior doesn’t appear in the GoWpfBasic demo.

Here I customize the links route :

This happens when I try to add a new link.


Is this for Silverlight or for WPF?

If you go ahead and draw a second link, and if you customize the routes of both links, when you draw a third link, do the first two link routes get recomputed?

Yes, the first two link routes get recomputed when I draw a third link.

I’m using WPF.


Do you have this problem if each link connects a distinct pair of ports? In other words, does the invalidation and recomputation of the route happens when the link connects with different ports, or only when connecting with the same port?

BTW, I’m thinking that what you are seeing is because when there are duplicate links (between the same pair of ports) GoXam tries to route them separately. So the problem is that the routing is not taking the existing route into account.

One thing you could try is setting Link.Route.Adjusting to a value other than “None”. I suggest you try “Stretch” or “End”. See the LinkAdjusting enumeration for more details.

Thanks a lot. Adjusting to Stretch worked.