开发者

Only two panels and the Weifen Luo library

I want to make only two panels like Solution Explorer and toolbox (Visual Studio) in my application.

The problem is that I don't understand h开发者_高级运维ow it works in the Weifen library. How can I make two dockable panels?


Follow the following steps:

  • Add reference to the Docking library.
  • Create two forms.
  • For each form go to source view and extend them from the DockContent class.

    public partial class ToolWindow : DockContent
    {
         public ToolWindow()
        {
            InitializeComponent();
        }
    }
    
  • Add a DockPanel control to your main form. This is where your tool windows will be docked.

  • To show the tool windows here is the sample code

    ToolWindow myToolWindow = new ToolWindow();
    myToolWindow.Show(this.myDockPanel, DockState.DockLeftAutoHide); // Dock Left & Auto Hide
    
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜