Node name change

Hello i’m probing this library and i have found a question.

If i change a GraphLinksModelNodeData, name for a node, the link, show a
earlier name. How can extend the change of node name to the connected
links?

Regards

If I understand your situation correctly, you are changing the key of a node and then want to update the references to the node data that are present in some link data.

You could try to make the change to the link data before changing the node data key.
Call model.GetLinksForNode(d).ToList() to get a copy of that collection.
(A copy is wise because changing a link data’s reference to a connected node data will modify that collection.)

But I think it would be wiser not to modify the node key at all.
Can’t you show and edit a different node data property instead of the key property?

The idea is to have an user custom name for a node

Then you have to use a different property instead of the key.
Keys must be unique, but whatever the user might type could result in duplicates.

If you are not already using the Text property, you could.
But it is easy to add properties.

Then, if i change the name of node, How could find it from diagram?

I have found model.findnodebykey.

Finally i used a custom user key, and leave the node key. It’s works really good.

Regards