开发者

How to create a control like Solution Explorer in Visual Studio?

I want to create control that seems and works like the Solution Explorer of Visual Studio. I mean not the functionality of solution explorer, the control should be seems like t开发者_运维知识库hat control. That means, server explorer, toolbox, error List,... All these controls will pop-out when we put mouse and pop-in when we leave. We can lock and unlock those controls also.

So can anyone help me, to get the solution for this problem.

Thanks!!!!!!!!!!!


I am assuming you are using C#/VB.NET for development. The dockpanel suite will provide a docking framework for an application. Basically in terms of dockpanel, it is the forms which can be docked on the application using drag and drop like visual studio.

So create a treeview control in the form and dock it to the parent. You can populate the treeview control based on file directories or any specific needs of your project. Please note in dockpanel you create a form by not inheriting from Form class but from DockContent class. Documentation will give you more insight of how to create applications. It has a good example along with the source code in which it simulates the all the visual studio panes. It also provides and option to save the position of various docks which can act as a user preference. For eg, you may like to position solution explorer on left side whereas i may want it on right side. this get stored in a conf file which gets read next time when you start the application.

Incase you using MFC, then visual studio 2008 SP1 provides you with docking framwork and within that use the treeview control.

XAML also provides a docking framework. But i am not sure, you need to verify.

Win32 API does not have any native docking framework.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜