I've got a feeling this is going to be an easy one...
When using Layout Serialization with the Docksite it remembers the last active Document/Tool Window which I believe is through the LastActiveDateTime by default?
However it seems that this doesn't seem work to when I manually (well, programatically) set the IsActive property I bind my ToolWindows with to True.
Flow being I deserialize my settings file.
I create my ViewModels based of my Models. So for each of my Page models I create a PageViewModel, and then for each Display model within the Page model I create a DisplayViewModel. When I create these ViewModels I just pass in my model and assign the relevant properties ie this.IsOpen = model.IsOpen; etc.
Then for my pageViewModels I add my these to my via DocumentItems.AddRange(newPages) which is bound to my DockSite.DocumentItems property. Then use the DockSiteSerializer.LoadFromString to apply my layout.
Now I would expect the IsActive setting of my DisplayViewModel to be applied but it isn't, but when I switch Pages it does apply the correct IsActive that would have been the last Display to have been Activated.
Looking at your MVVM examples I can see that you set IsOpen after you've added your ViewModels to your collection.
Is it the case that these settings need to be set after you've added your ViewModels to the collection?