Dockable Form

此生再无相见时 提交于 2019-12-06 06:17:16

问题


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


回答1:


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.




回答2:


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




回答3:


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




回答4:


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




回答5:


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




回答6:


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



来源:https://stackoverflow.com/questions/84804/dockable-form

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