GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoSubGraph Class / LayoutPort Method
Example
In This Topic
    LayoutPort Method
    In This Topic
    This positions the port within the group, normally exactly where the Handle is.
    Syntax
    public virtual void LayoutPort()
    Remarks
    If there is no Handle, the port gets the bounds of the Label. If there is no Label, the port is positioned at the top left corner, inside the margin. If you override this, you should be sure to position the port within the bounds of the subgraph.
    Example
    For example, if you want the port's Bounds to be the same as the bordered area, override this method as follows: For more examples, see the classes in the SubGraphApp sample.
    public override void LayoutPort() {
      GoPort p = this.Port;
      if (p != null && p.CanView()) {
        RectangleF r = ComputeBorder();
        p.Bounds = r;
      }
    }
    See Also