Hi Michael,
Thank you for the sample. It helps illustrate the scenario very well.
What's happening is that you are effectively updating the DockSite.ToolItemsSource property as the ComboBox selection updates but nothing is saving the layout before the update. When the ToolItemsSource changes, all the docking windows in the layout are closed since it thinks you want a brand new layout. As the second ComboBox item is selected, it's a brand new default layout for these new tool window view-models. When you flip back to select the first ComboBox item, it loads the tool window view-models from before, but the IsOpen property is false on all of them from when they were closed earlier. Thus the layout appears blank.
There are two different approaches we can take here, but you need to let us know which one is more appropriate for your app.
1) You mentioned wanting to keep the tool windows in the same place. If you want to keep the exact same tool windows, then you should not be binding them to view-models in your ComboBoxAvailableItemViewModel that changes, and should have the ToolItemsSource view-models at a higher level that doesn't change. That is the easiest solution, since if ToolItemsSource never changes (e.g. you use a Binding without inherited data context), the layout won't change.
or
2) You want different tool window view-models in each ComboBox selection. This will cause the layout to change when the ComboBox selection updates but we can add code to serialize the layout before and restore after.
2a) This is #2 where you want your Red, Green, Blue tool windows to end up in the exact same location they were at before any changes to the ComboBox selection. But if you want this, then it seems like #1 is a better, cleaner approach.
2b) This is #2 but where each ComboBoxAvailableItemViewModel will store its own unique layout. So when you have the first ComboBoxAvailableItemViewModel selected and switch to the second one, it will serialize the first's layout and store it in the first ComboBoxAvailableItemViewModel. Then the second one will load the second ComboBoxAvailableItemViewModel's previously-serialized layout (if known), and so on.
Let us know if you are looking for #1, #2a, or #2b.