private void CloseAll() { for (int i = dockControl.DockItems.Count - 1; i >= 0; i--) { DockItem item = dockControl.DockItems[i]; item.Close(); } }