GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoIconicNode Class / CreatePort Method
Example
In This Topic
    CreatePort Method (GoIconicNode)
    In This Topic
    Create and initialize the node's port, which is normally not visible and at the middle of the icon.
    Syntax
    protected virtual GoPort CreatePort()

    Return Value

    Remarks
    GoPort.IsValidFrom and GoPort.IsValidTo are true, by default, thus allowing users to draw links from or to these nodes. You may want to set those properties to false if you want prevent users from drawing links with a mouse-down and drag from the port, or to create a port with a different size or appearance.
    Example
    If you override this method, you may want the definition to do some of the things that the standard definition does:
    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;
    }
    See Also