XtraTabbedMdiManager Layout (Tile Vertical, Tile Horizontal. Tile Cascade)

890 views Asked by At

I have ribbon form with 3 button.. I want to change the tabbed child form become Vertical, Horizontal, or Cascade... is there how to do it ?

If using frmmain with property

ismdiContainer=true

private void btn1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
     form1 frm1 = new form1();
     frm1.MdiParent=this;
     frm1.Show();
}

private void btnVertical_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
     LayoutMdi(MdiLayout.TileVertical);
}

private void btnHorizontal_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
     LayoutMdi(MdiLayout.TileHorizontal);
}

private void btnCascade_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
     LayoutMdi(MdiLayout.Cascade);
}

the Question is, How to change the Layout when I press the btnVertical to Change the Layout

1

There are 1 answers

1
DmitryG On BEST ANSWER

To make the LayoutMdi method work, just remove the XtraTabbedMdiManager from your form or nullify the XtraTabbedMdiManager.MdiParent property because the MdiLayout mode is not applicable for XtraTabbedMdiManager's tabs:

void btnVertical_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
     xtraTabbedMdiManager1.MdiParent = null; // turn off tabs
     LayoutMdi(MdiLayout.TileVertical);
}

As an alternative solution, you can try the DocumentManager component with it's Native MDI View.