The DiagramItemCollection overload seems like the way to go. Thanks!
I'm getting some strange behavior, though. I've got my Diagram's Bounds set to (0,0,700,300). I have the layout1.Margin on the first set of nodes set to (17,17), and the layout2.Margin on the second set of nodes set to (200,17).
Using Snoop, I can see that the Diagram's DesiredSize is (700,300), and a child object called, CZ, is also (700,300). But then I add a node that gets placed on the right side, and both the Diagram and the CZ object grow to (883,317), but the CZ object is offset from the top left corner of the Diagram by 183,34. It's like the margin's are somehow getting compounded, but it's 200 - 17 and 17 + 17. All the nodes look like they are placed correctly relative to each other, but there's that offset of 183,34 from the Diagram's top left corner.
Is there something I need to do to make sure the second arrange phase doesn't move the Margins?
Thanks so much!
|