I have implemented ILayoutupdateStrategy using examples here but so far, each new LayoutDocument is always placed in the same LayoutDocumentPane. I would like to add the new LayoutDocument alongside an existing Document automatically.
I've tried creating a new LayoutDocumentPaneGroup and moving the existing LayoutDocumentPane, plus the new content into that new group, but when I then try to add the group into the layout structure the methods never return and the application hangs.
LayoutDocumentPaneGroup newGroup = { a LayoutDocumentPaneGroup containing both the original sibling LayoutDocumentPane and the new content LayoutDocumentPane }
LayoutDocumentPaneGroup parent = { the parent group of the sibling document }
I've tried things like:
parent.RemoveChild(sibling);
parent.Children.Add( newGroup );
and
parent.Children.ReplaceChild( sibling, newGroup );
but they all seem to hang on those methods.
I expect I'm approaching this in the wrong way completely so any pointers would be very welcome.