Merged final bits from http://dockpanel2012.codeplex.com