RecordNode border problem

I would like to create a link between two record nodes and the border line of record item must be displayed by red color when the link is connected to destination like demo1 sample code.
Inspite of I tried to search methods, classes, properties, I can’t do that.
Best Regards,

Are you asking about how Demo1 causes the potential target port of a new link or of a relink to be highlighted in red?
That’s done by the GraphViewLinkingNewTool and GraphViewRelinkingTool tools. They just override GoToolLinking.PickNearestPort to highlight the GoToolLinking.EndPort. The EndPort is not a “real” port in your document/node, but the temporary port created by the linking operation.