How to put nodes inside groups and keep positions

I think what has happened is that adding a node without a location causes the layout to give it a real location, which in this case was at (0, 0).

Because your Group template uses a Placeholder, the group’s location is where the placeholder is. (By default, that’s at the top-left corner of the placeholder.) Any position that you set or that it gets through a binding will be ignored.

You have given the whole panel a particular desiredSize via a binding, so the panel is a lot bigger than it needs to be to hold the placeholder. But because the placeholder is in an “Auto” panel, by default it is centered in that panel. (You could change that by setting its alignment.)

If the “Milan” node is at (0, 0), then the placeholder will be around (0, 0). But the placeholder must be center-aligned in its panel, which means the group will be centered around the placeholder. (More or less – the TextBlock causes it to be slightly asymmetrical vertically.) That means the position of the group, i.e. its top-left corner, has to be way towards the left, at a significant negative X value.

I’m not sure about how you intend to use groups and nodes. Perhaps you should not use a Placeholder: GoJS Sized Groups -- Northwoods Software