http://www.cn-web.com/shtml/article/net/wform/2009/02/04/441.shtml dockPanel2.Dock = DockingStyle.Right; dockPanel2.Visibility = DockVisibility.Visible