GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoBasicNode Class / CreateShape Method
the GoPort created for this node by CreatePort
Example
In This Topic
    CreateShape Method
    In This Topic
    Create and initialize a GoShape.
    Syntax
    protected virtual GoShape CreateShape( 
       GoPort p
    )

    Parameters

    p
    the GoPort created for this node by CreatePort

    Return Value

    By default this returns a GoEllipse that is somewhat larger than the port p.
    Remarks
    By default the ellipse uses a white brush--set the Pen and Brush properties to change the appearance. The shape is not itself selectable, resizable, or reshapable.
    Example
    If you override this method, you may want the definition to do some of the things that the standard definition does:
    protected virtual GoShape CreateShape(GoPort p) {
      // create the bigger circle/ellipse around and behind the port
      GoShape e = new GoEllipse();
      SizeF psize = p.Size;
      e.Size = new SizeF(psize.Width + 2*7, psize.Height + 2*7);
      e.Selectable = false;
      e.Resizable = false;
      e.Reshapable = false;
      e.Brush = GoShape.Brushes_White;
      return e;
    }
    See Also