Custom Link

please help me with an example to create a labeledlink that look like the following example:

the label must always be in the center and in the middle of the linkline, with the option to hide the ellipse.
thanks

Use GoLabeledLink, and set the MidLabel to the “LabelNode” below.


        GoLabeledLink link1 = new GoLabeledLink();

        LabelNode ln = new LabelNode();
        ln.Text = "label here";
        link1.MidLabel = ln;
        link1.MidLabelCentered = true;

  [Serializable]
  public class LabelNode : GoTextNode {
    public LabelNode() {
      this.TopLeftMargin = new SizeF(8, 1);
      this.BottomRightMargin = new SizeF(8, 1);
    }

    protected override GoPort CreatePort(int spot) {
      return null;
    }

    protected override GoObject CreateBackground() {
      GoRoundedRectangle rr = new GoRoundedRectangle();
      rr.Corner = new SizeF(18, 9);
      rr.BrushColor = Color.White;
      rr.PenWidth = 2;
      return rr;
    }
  
  }