private void MdiClient_Layout(object sender, LayoutEventArgs e) { if (this.DocumentStyle != DocumentStyle.DockingMdi) return; foreach (DockPane pane in this.Panes) if (pane.DockState == DockState.Document) pane.SetContentBounds(); this.InvalidateWindowRegion(); }