I'm trying to add a document after pressing a button.
DockingManager.Children.Add(element);
SfDockingManager.SetDockState(element, DockState.Document);
SfDockingManager.SetHeader(element, document.DisplayName);
This works fine for documents loaded at the start of the app. When called in a button click callback, it will create a widget with no header, to the left (not a document). If I click the 'Float' button I can then drag it into the document pane and its Header will show up.
If I call Children.Add after SetDockState/SetHeader, the widget does not show at all.