private void HideSiblingDropDowns(ToolStripDropDownItem item) { try { ToolStripItem menuItem = this.MenuItem; while (item != menuItem) { item.HideDropDown(); if (item.Owner is ToolStripDropDown) { item = (ToolStripDropDownItem) ((ToolStripDropDown) item.Owner).OwnerItem; } else { return; } } } catch (Exception exception) { if (System.Windows.Forms.ClientUtils.IsCriticalException(exception)) { throw; } } }