Position Ports on GoGeneralNode

I’m using a GoGeneralNode with GoRoundedRectangle as the Icon. I need to evenly position 3 ports (GoPortStyle.Triangle) on the Top. What’s the best way to do it? I know I need to override LayoutChildren but can’t find enough detail for that method.
Also, is there a way to have the 1st port with Triangle pointing up and the 2nd and the 3rd with Triangle pointing down?

You might want to look at the SequencedNode example class in the Demo1 sample application.
To control the appearance of a GoPort, you can set its Style to the what you want, including setting it to GoPortStyle.Object and setting GoPort.PortObject to any GoObject you like (it can be shared by multiple ports if the port-object isn’t part of any document or view).
You may also want to remember to set the GoPort.FromSpot and .ToSpot and .IsValidFrom and .IsValidTo properties appropriately for your intended uses.