A: 

Maybe you could start studying http://www.codeplex.com/AvalonDock which is a wpf docking library. There is probably something to learn from it.

I had a look at it prior to asking this question, it looks kinda messy
kitsune