docking control similar to visual studio

落花浮王杯 提交于 2019-12-04 13:36:53

问题


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!


回答1:


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

http://avalondock.codeplex.com/




回答2:


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.



来源:https://stackoverflow.com/questions/9068122/docking-control-similar-to-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!