Make port invisible once a link is connected to/from the port


#1

Hi,

I want to implement that by default node will show all the ports and as and when a link is drawn from the port the, the connected port should get hidden while rest should be visible. Any pointers in this regard?

Thanks


#2

Override http://goxam.com/2.2/helpWPF/webframe.html#Northwoods.GoWPF~Northwoods.GoXam.Tool.LinkingBaseTool~FindTargetPort.html on LinkingTool, and on RelinkingTool if your app supports it, to first call and remember the base method, and then update the opacity of the ports.

Don’t change their visibility, since that would affect their linkability.


#3

Hi Walter,

The solution you provided, I altered a bit and used Diagram_LinkRelinked and Diagram_Linked events to set the opacity.

FindTargetPort had some issues like it would make the nearby port invisible due to the port gravity.

But that worked !!
Thanks alot.