Does the XamDockManager support a databound list of content? I want to build a drag-and-drop layout where the dockmanager is default to a two column layout and the user can drag and drop from another listbox or from within the dockmanager. Will the dockmanager also save the state of these panels using the DockManager SaveLayout method?
To answer the original question - no the xamDockManager is not a simple ItemsControl that is to be bound to a list of items. It is meant to provide the Visual Studio docking interface. As in VS, each pane is an independent entity that may be dragged around/manipulated - whether that is docked to an edge of the control, floating, unpinned, closed, etc. Also as with VS, the XamDockManager's docked panes are docked around some content. If you wanted a VS style tabbed document interface then that content would be a DocumentContentHost which would interact with the XDM and provide that tabbed document experience. Alternatively you can set the Content to anything else and that will essentially be opaque content that is surrounded by the docked panes (e.g. one might use a RichTextBox and the docked/floating panes contain various controls that augment/affect that rich text content). Lastly, one could set the LayoutMode to FillContainer in which case the last docked SplitPane will fill that central area where the content would have resided.
Also, the dragging of the xamDockManager is internal to the control so it doesn't support dragging from something else like a listbox as you asked about.
With regards to the SaveLayout that serializes out information about the ContentPanes and where they are positioned, etc.. Assuming the Name of the ContentPane instances are consistent then they would be restored to their expected/previous locations. The SaveLayout doesn't save any information other than its own layout information so it wouldn't be saving any information about whatever might be within the ContentPane's Content.
I'm not sure exactly what you are trying to accomplish but I suspect that the xamDockManager is not the appropriate UI for the scenario. If you really do want to pursure using it and want binding then you might review this post about how one might create ContentPane instances based on a given collection. Alternatively, you might look at other controls - e.g. a XamTilesManager which has a notion of dragging the tiles, maximizing tiles, etc. or some other ItemsControl derived class perhaps with your own custom ItemsPanel or custom behavior that will provide the dragging logic you want.
No, this hasn't been resolved. I am looking for a way to utilize the DockPanel to have a list of UserControls in two columns. Each column represents the docked left and docked right scenario as well as allows the user to drag and drop the controls area.
Hello,
I am just checking if you require any further assistance on the matter.
I have been looking into your questions and I can suggest you look into the following blog from our online community :
http://es.infragistics.com/community/blogs/andrew_smith/archive/2010/01/12/itemssource-for-xamdockmanager-elements.aspx
where Andrew Smith has provided a sample application about implementing binding support.
Regarding more information about Saving and Loading Layouts you can look into this link from our online documentation :
http://help.infragistics.com/NetAdvantage/WPF/2012.2/CLR4.0/?page=xamDockManager_About_Saving_and_Loading_Layouts.html
Please in future if you have multiple questions, create a separate forum thread for each of them. This way other visitors of our community can get benefit from that.
If you need any further assistance on this matter, feel free to ask.