docking control similar to visual studio

2019-03-31 18:44发布

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!

2条回答
Melony?
2楼-- · 2019-03-31 19:15

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

http://avalondock.codeplex.com/

查看更多
ゆ 、 Hurt°
3楼-- · 2019-03-31 19:37

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.

查看更多
登录 后发表回答