Fixed position nodes

Hi all, really excited about working with this product in my current project!

I'm working with a modified version of the dynamic ports example. I'm trying to anchor the ports from "Node 1" to the left side of the diagram, and anchor the ports from "Node 2" to the right side of the diagram. The other nodes can be moved, and we will use a 2nd diagram to drag-and-drop nodes onto this diagram.
Assuming we can make node templates for Node 1 and Node 2, is it possible to lock their position while allowing Nodes 3+ to be moved, and to provide orthogonal linking betwen them?

The simple answer to your question is that you can set go:Part.Movable=“False” and go:Part.Copyable=“False” on your Node1 and Node2 nodes.

What’s supposed to happen when the Diagram changes size?
What’s supposed to happen when the user zooms in or out?

You might need to implement DiagramPanel.ViewportBoundsChanged event handler that repositions Node1 and Node2.

Thanks, those are the exact questions I was pondering. Does the diagram support fixed sizing?

In the demo the diagram seems to grow as nodes are dragged near the boundaries.

That behavior you see is called autoscrolling.

To disable that behavior, you can set DiagramPanel.AutoScrollRegion to a Thickness of zero. You can do that either in XAML with a custom Diagram.Template or in code in a Diagram.TemplateApplied event handler. The latter is needed because until the ControlTemplate has been expanded, the Diagram.Panel won’t exist yet.

Thanks again, very helpful information.