This sample demonstrates how two Diagrams can show the same model in two different manners and yet remain synchronized due to Model.Changed events and the UndoManager support for transactions.

Changes to either Diagram will be reflected in the DiagramModel. The log shows changes to the model as they occur. The UndoManager remembers transactions for undo/redo. The TreeView shows the UndoManager's transactions.

Note how separate DataTemplates are used for the nodes and the links of the two diagrams. Although the appearance of a node in one diagram is quite different than in the other diagram, the nodes are moved in synchrony due to their binding of the go:Node.Location dependency property to the same property on the data.

As the user undoes and redoes changes, no additional transactions are recorded in the UndoManager or reflected in the TreeView here. However, the currently selected top-level tree item changes to highlight the transaction that would be redone if a Redo were to occur.