private void MergeItemClick(object sender, EventArgs e) { ToolStripItem item = (ToolStripItem)sender; RadegastTab tab = tabs[item.Tag.ToString()]; selectedTab.MergeWith(tab); SplitContainer container = (SplitContainer)selectedTab.Control; toolStripContainer1.ContentPanel.Controls.Add(container); selectedTab.Select(); RemoveTabEntry(tab); tabs.Add(tab.Name, selectedTab); }