Link visual bug

Hi there,
We are currently evaluating GoDiagram for a graph editor in our application, but we are facing a very strange visual bug with links.

As you can see on the screenshot, when we start scrolling in the diagram, sometimes links do not start right at the beginning of the port location. Also, they sometimes do not snap exactly to the destination port .

Worse, sometimes the link goes to the wrong port.
Here you might think that “OnDisable” of node G transitions to “Enable” of node H, but it does not.

On the data side, OnDisable actually connects to “Reset” and if i move node G a bit, the arrow properly connects to “Reset”.

After many hours of debugging, i have found an odd fix for this. If i move all my nodes, and links templates from the view containing the graph, to App.xaml dictionnary, it works perfectly.

Here is a test application where you can reproduce the issue :
In this test app, resources are defined in DiagramControl.xaml. Which should trigger the visual bug. To “fix it”, just comment out resources in there, and uncomment those defined in App.xaml.

Please let me know if this works as intented, or if there is something i missed.
We really need to be able to define templates directly in the view as different views will have different templates for nodes and links.

Thank you in advance for all the help you can provide :-)

moved to GoXam forum.

I will try your project as soon as I get a chance.

The problem is caused by your use of {DynamicResource …} instead of {StaticResource …} when referring to the DataTemplates and the Style used by your Node DataTemplates, combined with GoXam’s optimization which causes Parts to not exist in the visual tree for such references to be resolved.

If you use StaticResource references instead (you’ll need to move the Style declaration earlier in the Resources), everything works just fine without any App Resources defined.


Using StaticResource instead of DynamicResource worked !