Iconic node port behavior


#1

We have a group node, the single port of which we would like to behave much as does that of a GoIconicNode. We have not however been able to duplicate the inbound and outbound link behavior of a GoIconicNode, even after trying to clone the behavior by looking at port properties in the debugger. The port is centered behind a bitmap image, and our links often do not originate or terminate as nicely as they do in the Go version; for example a link may be drawn on top of the image. Is there some source we could look at to get an idea of how to configure this port properly?


#2

Here’s the definition of GoIconicNode.CreatePort:
protected virtual GoPort CreatePort() {
GoPort p = new GoPort();
p.Style = GoPortStyle.None;
p.Size = new SizeF(6, 6);
p.FromSpot = NoSpot;
p.ToSpot = NoSpot;
p.PortObject = this;
return p;
}
Probably the concept you missed was setting GoPort.PortObject. You can also set it to just be the Icon, if you want links to cross over the Label.