This sample demonstrates defining a custom layout that positions chained nodes back and forth.

Because the layout is declared with the ViewportBoundsChanged condition in the DiagramLayout.Conditions, as the size of the diagram's viewport changes, the diagram performs the layout again.