The AddLink method will be called only if you add new connection in the diagram (therefore in the GraphSource). However, if you add connection and you doesn't call the base.AddLink() method, this new connection will be included in the diagram, but won't be synchronized with the view model which will lead to incorrect behavior of the link.
In order to achieve your requirement you can use the ConnectionManipulationCompleted
event that I mentioned in my last reply and implement your logic there.
sender, ManipulationRoutedEventArgs e)
(e.ManipulationStatus == ManipulationStatus.Attaching)
var targetShape = e.Shape
var connection = e.Connection
var node = targetShape.DataContext
var link = connection.DataContext
( your conditions are met)
// the connection won't be added/moved
As for removing a connection (link) from the diagram you can use the GraphSource's Links collection. The last connection in the collection is the last connection added in the diagram.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos
and start improving your app based on facts, not hunches.