Notify event after DoNewLink

I am trying to notify an event when I do a link between to GoObject. I have a GoObject that has 2 port but I want when I link the remove other port. I have only 2 ports only because I want to give to user abilities to connect from every port. My idea…I dont want to mix code. I want to do that decoupled.

I have extend GoPort and in my OnLinkChanged raise parent.Change(int subhit…) and catch this in my parent object execute my method tha remove other port.

I am all ears…

I’m going to guess a little bit at what your asking. I think you want to handle the DocumentChanged event. If you look in NodeLinkDemo (in GraphView OnDocumentChanged), you’ll see code for
handling link added / removed / relinked.

It’s done here as an override, but that same basic code works in a DocumentChanged Event Handler (like OrgCharter does in GraphNodeForm DocumentChanged).