When resizing a node, the node body and its ports do not resize together.
As the node is resized, the ports move away from the node body, so they no longer stay aligned with the edges of the node. The ResizeElementName is the first child element which has the height and width set, same is the SelectionElementName. Here is a part of my node template which is wrapped in a SpotPanel
I’ll assume you want to do something like the Nodes in the Dynamic Ports sample of GoWpfDemo, but perhaps without the ability to dynamically add and remove ports. And perhaps not having ports on all four sides.
So I added these attributes to the main element of the Node Template, which is a Grid:
Then I was able to resize each node satisfactorily, because the ports are held by elements in Grid cells adjacent to the middle (body) element that is resized.