Nested diagrams links


I’m wondering whether you guys support a use-case of having a diagram (as a node) inside of another diagram. If there is a sample, that would be great. I’m not sure how your events work at this point.
How about the possibility of having a node from Diagram A to link to another node in Diagram B?

A long time ago we tested having a Diagram inside a Node’s DataTemplate. I think that should work fine.

As far as linking between Diagrams, that could work if both Diagrams are inside a containing Diagram. Some extra work would be needed for:

  • handling multiple models, one for each diagram, and deciding how to implement cross-model references
  • dealing with the ambiguity of a link being connected to a node containing a diagram as well as to a particular node/port inside that diagram
  • scrolling or zooming in either nested diagram would require calling Node.InvalidateRelationships() so that all of the links connected to the node could be re-routed appropriately
  • handling links that connect to nested nodes that are scrolled off the nested viewport
  • dealing with copying (and deleting?) nodes

However, before you proceed with that course of action, I would investigate whether alternatives would work better and also be easier to use. What’s wrong with using Groups instead of nested Diagrams? The user wouldn’t be able to scroll/zoom the subgraphs, but it’s all a lot easier to manage, in a single model.