Problem with links

Hi, <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I create an infrastructure project for a flow diagram using the GraphLinkModel.

I have two applications that do the same thing and the links aren't drawn good in the second application.

I check the parameters of the Link and make sure all the parameters are current

(From,To,FromPort,ToPort) and I don't know why in the second application the link doesn't drawn correctly.

Can you tell me what to check or how to debug it so I will know how to find the problem?



Is this what you see when the user first opens the diagram?What happens when the user drags the middle node?
(If that isn’t normally permissible, temporarily allow it for debugging.)

I added another node and drag one below the other which cases them to switch places. <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Both of them have links that coming out from the wrong place and going to the wrong place before and after the drag.

In the debugger, or with some code, find the actual port FrameworkElement on one of the nodes.
(You seem to have more than one port per node, so you might want to call Node.FindPort.)
Check that it is the element that you wanted and that its ActualWidth is what you expect.
You can also call Part.GetElementPoint to get an idea what the Route does to compute the end point of a link.
(You can call Link.Route.GetLinkPoint to actually get the end point.)

I’m suspecting that the panel layout of your node isn’t what you expected.

Hi Walter,<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your help.

I have many ports and after debugging my and your code together I saw the find port didn't found the port because the application passed me wrong parameters they switched between the in port Id to the out port id.

Thanks again for your guiding