Dear Slavcho,
I was able to avoid the exception.
I override the HitTest on our LinkView class
(LinkView : DiagramLink)
public override DiagramItem HitTest(Point point, double threshold, bool onlyNodes, bool onlyInteractive, bool includeHandles, bool includeLabels)
{
var what = base.HitTest(point, threshold, onlyNodes, onlyInteractive, includeHandles, includeLabels);
if (what?.Parent == null)
{
return null;
}
return what;
}
So..
The Parent (diagram) was null for the link that was somehow kept in the memory.
The diagram that we are using shows that Items collection does not contain this link. Same as Links collection.
So it was kept somewhere in memory so the HitTest was returning it when hovering on the diagram over its previous route.
Maybe it will helps you
Cheers