That's a good idea, but I think you're best off implementing this yourself for the moment. We can't change the behaviour of SandDock at this stage and it would be overkill to add a new parameter for this functionality. You can get the guid of the last active window at the same time as you call GetLayout, and you could even add it to the XML produced (or store it somewhere else). After restoring layout, get a handle to that window using the FindControl method and call Activate on the window.