我有3个按钮的带状表格.. 我想将标签式子窗体更改为Vertical,Horizontal或Cascade ... 有没有怎么做?
如果使用带有属性的frmmain
=的IsMdiContainer真
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);
}
问题是,当我按btnVertical更改布局时如何更改布局
答案 0 :(得分:0)
要使LayoutMdi
方法有效,只需从表单中删除XtraTabbedMdiManager或使XtraTabbedMdiManager.MdiParent属性无效,因为MdiLayout模式不适用于XtraTabbedMdiManager的标签:
void btnVertical_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
xtraTabbedMdiManager1.MdiParent = null; // turn off tabs
LayoutMdi(MdiLayout.TileVertical);
}
作为替代解决方案,您可以使用DocumentManager尝试Native MDI View组件。