xtraTabbedMdiManager 双击最大化和关闭后返回主界面 z
双击tab头部时候子窗体Float时界面最大化和关闭Float状态的子窗体并不是真正关闭而是回到主界面的问题,
代码如下,其中xtraTabbedMdiManager1_Floating这个是xtraTabbedMdiManager的Floating事件的实现
private void xtraTabbedMdiManager1_Floating(object sender, DevExpress.XtraTabbedMdi.FloatingEventArgs e) { //Mdi模式下子窗体Float时候窗体最大化和关闭时候自动回到Tab设置 e.ChildForm.WindowState = FormWindowState.Maximized; e.ChildForm.FormClosing += (s, es) => { if (xtraTabbedMdiManager1.ActiveFloatForm == (s as Form)) { es.Cancel = true; xtraTabbedMdiManager1.FloatForms.Remove(s as Form); e.ChildForm.MdiParent = this; } }; }