views:

654

answers:

6
+2  Q: 

Dockable Form

How do you create a "dockable" form, similar to the windows in Visual Studio?

+3  A: 

I've used Weifen Luo's "DockPanel Suite" to good effect. It's an open source library that mimics Visual Studio's docking system very well, including nested docking, floating windows, tabbed windows, etc. You can download his source and see his approach there, if you'd prefer your own, simpler solution.

Sourceforge project here: http://sourceforge.net/projects/dockpanelsuite

AR
A: 

Any custom control (composite, not inherited) in winforms can be docked, because it's really just a panel underneath. Combine this with a tablelayout panel for the high-level layout of your form and you have all the pieces. But you still have to implement all the glue and supporting UI yourself.

Joel Coehoorn
+1  A: 

One of the best ones I've seen and used is SandDock from Divelements, they have both a WinForms and a WPF version.

Scott Dorman
+1  A: 

I've used CodeJock's DockingPane ActiveX control to create docking panes before.

Matt Dillard
+1  A: 

We are using Weifen Luo's "DockPanel Suite" for our project and quite happy with it.

metamal
+1  A: 

You'll probably want to consume someone else's component for this purpose rather than trying to roll your own, and there's no native WinForms way to do this.

There is a free library on CodeProject for this purpose, but I haven't tried it.

http://www.codeproject.com/KB/toolbars/DockContainer.aspx

paulwhit