using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Text; using System.Windows.Forms; using System.Drawing; namespace Mesnac.Controls.Default { [ToolboxBitmap(typeof(ToolStrip))] public partial class MCtoolStrip : ToolStrip { public MCtoolStrip() { InitializeComponent(); this.ItemAdded += new ToolStripItemEventHandler(MCtoolStrip_ItemAdded); } public MCtoolStrip(IContainer container) { container.Add(this); InitializeComponent(); this.ItemAdded += new ToolStripItemEventHandler(MCtoolStrip_ItemAdded); } private void MCtoolStrip_ItemAdded(object sender, ToolStripItemEventArgs e) { ToolStripItem item = e.Item; if (item.GetType().IsSubclassOf(typeof(ToolStripControlHost))) { this.Items.Remove(e.Item); } } } }