4

Im looking for a docking control similar to visual studio. [For use in a c# program]

I've played around alot with the Weifen-Luo's Docking Library, which works great but is not quite right for what i'm working on. I need to be able to dock items within a tab control (or panel would work too) rather then within an mdi form.

The reason I'm looking to dock within in a tab is because with the current setup my main form has two tabs.

  • one that runs the main program
  • Another that has separate analysis tools.

Within the main tab I don't want any docking control. But within the second tab I would like the user to be able to use docking with the tools.

I'm hoping for a free solution, maybe there is some mod I can make to the Weifen-Luo's Docking Library source.

I'm just looking for any suggestions, thanks in advance!

hrh
  • 658
  • 1
  • 14
  • 24
  • WinForms or WPF? And docking within a tab control is a very strange thing to do; you're unlikely to find a library that supports it out of the box. – Cody Gray - on strike Jan 30 '12 at 17:47
  • Win Forms. Ill edit to add a small explanation of why I want to dock within a tab and maybe another answer will come out of that. – hrh Jan 30 '12 at 17:48

2 Answers2

6

For WPF, I can recommend AvalonDock. It's also used by SharpDevelop:

http://avalondock.codeplex.com/

Markus Palme
  • 659
  • 4
  • 15
  • 1
    I used avalondock while prototyping an app and it worked well. Ended up using docking tools from DevExpress due client requirements and it worked well also. – Ken Henderson Jan 30 '12 at 17:46
  • I'm using win Forms but ill be sure to check it out anyhow, maybe I can just use the WPF ElementHost to make it work. – hrh Jan 30 '12 at 20:42
  • I believe DevExpress is what I want + it has several tools that can improve several of my existing programs. Weather we go with it, that I don't know [since i was hoping for free] but so far I've been looking at the trial and it looks GREAT!! – hrh Jan 31 '12 at 22:18
  • One issue with the DevExpress is that the DockingStyles.Fill does not work appropriately – hrh Feb 01 '12 at 18:18
1

I was able to make it work With the Free Weifen-Luo's Docking Library.

you can simply add your dock panel to a user control or a tab control or any other type of container.

Controls.Add(dockPanel);

The one thing that was missing was that in order to use the DockStyle.Document you must have the following line of code:

dockPanel.DocumentStyle = DocumentStyle.DockingWindow;

This allows DockStyle.Document to be used with something other then an MDI interface.

hrh
  • 658
  • 1
  • 14
  • 24