I have open link enabled by setting ValidUnconnectedLinks to ValidUnconnectedLinks.Allowed.
and this is working as expected but the issue is in the unconnected link if I select the link and drag connected end of the link on any where on diagram it should not create a link rather it should disallow it.
To get the above feature I have overridden the IsValidLink() and it returns false if fromnode and tonode are null. But I see that even though this method returns false the link is created without any nodes.
I would like to understand the scenario that you are describing. Let us say that there is a single Node and a single Link in your Diagram, and that one link is connected with the node and the other end is not connected with any node. Are you saying that when the user tries to relink the end of the link that is connected with the node, there is a new link that is created. I would expect that the RelinkingTool would disconnect that end of the link.
Maybe you can bind Route.RelinkableFrom and Route.RelinkableTo so that they are false when connected with a node?
So do you want to allow relinking to another node/port, but disallow disconnecting any link entirely (i.e. not allow any Link with both FromNode and ToNode null)? While still allowing one or zero ends of links to be disconnected?