How to change the MDI layout when using raddock

1 Answer 11 Views
Dock TabbedForm
Carlos
Top achievements
Rank 1
Carlos asked on 30 Apr 2024, 02:14 AM

I have a mdi parent with raddock control, I add new forms and I can use the mouse to change the layout of the mdi child in the parent but I cannot make the layoutMDI to work to change the layout

 

this.LayoutMdi(MdiLayout.TileHorizontal);

Just doing something simple to get the idea

 

     private void Form1_Load(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;
            this.radDock1.AutoDetectMdiChildren = true;

            Form form = new Form2();
            form.Text = "MDI Child 1";
            form.MdiParent = this;
          //  form.Show();

            form = new Form2();
            form.Text = "MDI Child 2";
            form.MdiParent = this;
          //  form.Show();

            form = new Form2();
            form.Text = "MDI Child 3";
            form.MdiParent = this;
          //  form.Show();

            this.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal);
        }

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 02 May 2024, 12:30 PM

Hi Carlos,

Thank you for your interest in our RadDock control for WinForms.

The LayoutMdi() method comes from the native Form. It is not directly related to the RadDock control elements. The LayoutMdi() method can change the layout of Mdi Forms but not the windows inside the RadDock control. The RadDock control internal logic will arrange the Mdi child and dock them. You can check the Automatic MDI Form Handling article inside RadDock documentation related to the MDI functionality.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com
Carlos
Top achievements
Rank 1
commented on 10 May 2024, 01:28 PM

I got this way

 

            foreach (DockWindow frm in radDock1.DockWindows)
            {
                this.radDock1.DockWindow(frm, DockPosition.Left);
                this.radDock1.DockWindow(frm, radDock1.DockWindows[0], DockPosition.Left); //top  for Horizontal
            }
Tags
Dock TabbedForm
Asked by
Carlos
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or