Link Color

when i put an object in a document with specific color i need the link get color of the origin object . how can i do that.

did i explain my self

Do you mean when you create a link from a “red” node, that you want a “red” link?

yes …

ok… there’s lots of ways to accomplish this… here is one:

establish a DocumentChanged event handler on your GoView, and handle it this way:

void view_DocumentChanged(object sender, GoChangedEventArgs e) {
  GoLink l = e.GoObject as GoLink;
  if (e.Hint == GoLayer.InsertedObject && l != null) {

    GoBasicNode bn = l.FromNode as GoBasicNode;
    if (bn != null) {
      GoShape s = bn.Shape;
      if (s != null) l.PenColor = s.BrushColor;

Now… the details of the Node and how you get the color may changed based on what you’re using…