Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockcontent loaded dinamically side by side #179

Closed
SkydivingAngel opened this issue Dec 14, 2013 · 1 comment
Closed

Dockcontent loaded dinamically side by side #179

SkydivingAngel opened this issue Dec 14, 2013 · 1 comment
Labels

Comments

@SkydivingAngel
Copy link

Hi I''m loading a form as a treeview menu on the left of a panel and some other forms as documents to fill the panel. I need now to load also another treeview menu but it can also go below the other one. Ho can I align the secon treeview form next to the other?

Thanks a lot.
imm
imm2

            String Root = Application.StartupPath + @"\TreviewMenu001.exe";
            Assembly newDll = Assembly.LoadFile(Root);
            Type type = newDll.GetType("Menu.FirstMenu");
            Object obj = Activator.CreateInstance(type) as IEventInterface;
            Form frm1 = (Form)Activator.CreateInstance(type);
            var childForm = frm1 as IEventInterface;
            childForm.Send_Message += new EventHandler<MyEventArgs>(Get_Event);
            frm1.TopLevel = false;
            dockContent1 = new DockContent();
            frm1.TopLevel = false;
            frm1.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm1.Dock = DockStyle.Fill;
            frm1.Visible = true;
            dockContent1.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockLeftAutoHide;
            dockContent1.Text = frm1.Text;
            dockContent1.Controls.Add(frm1);
            dockContent1.AllowEndUserDocking = false;
            dockContent1.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.DockLeft);
@lextm
Copy link
Member

lextm commented Jan 12, 2014

As the sample project demonstrates, you simply need to specify DockPane.

            m_toolbox.Show(dockPanel, DockState.DockLeft);
            m_taskList.Show(m_toolbox.Pane, DockAlignment.Left, 0.4);

First show one dock content in DockPanel, and then use its pane to show another dock content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants