Prevent the user from creating links


how can I prevent the user from creating links by clicking on the ports.
I read about the IsValidLink property on the port but that is not exaclt what I need.
I want to be able to programatically create links but since we don't want the user to be able to modify anything in the view by dragging,clicking,etc, I want to prevent them from creating links while I still can do that in code.
How can I do that.

Programmatically you are never prevented from creating links, hooking them up by setting their FromPort and ToPort properties, and adding them to your document.

To prevent the user from drawing any links, set GoView.AllowLink to false,
or set GoDocument.AllowLink to false, depending on the scope for which you want to limit the users.
that worked as well.
Tanksvery much.