简体   繁体   中英

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

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

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM