Restrict linking by node template

I have 2 node templates (T1 & T2) and my requirement is that only nodes with template T1 can be linked to T2 and no other type of node (group or node with a different template) can be linked to each other in the diagram.



In other words I want to disable linking of all types except for linking from T1 to T2 in my diagram

Take a look at the section of the GoXamIntro talking about “Link Validation”. The example does almost exactly what you want, except that the sense is reversed – it’s not allowing a link from “Start” nodes to “End” nodes.

Basically you install a custom Diagram.LinkingTool that overrides the LinkingTool.IsValidLink predicate.