Closed ATEEKGIT closed 10 months ago
If you are connecting links between 2 nodes directly:
var sourceNode = (link.SourceAnchor as ShapeIntersectionAnchor)!.Node;
// OR
var sourceNode = link.SourceAnchor.Model as NodeModel; // or your custom type
If you're using ports:
var sourceNode = (link.SourceAnchor as SinglePortAnchor)!.Port.Parent;
// OR
var sourceNode = (link.SourceAnchor.Model as PortModel)!.Parent; // or your custom type
thanks , this worked for me , TaskPort is my custom port.
var targetNode = (link.Target.Model as TaskPort).Parent;
My nodes are custom model is holding data inside , when nodes are linked i need to some how know programmatically which node attached to which node , i tried Diagram.Nodes.First().Links and then lost where is next node information is stored.
any idea to identify programmatically , the both nodes models attached to a link as source and target
currently I am trying version 3 and its just excellent , please accept a heartly thanks from my side.