private void OnItemsChanged(
            RadItemCollection changed,
            RadItem target,
            ItemsChangeOperation operation)
        {
            if (this.IsDisposing || this.IsDisposed)
            {
                return;
            }
            switch (operation)
            {
            case ItemsChangeOperation.Inserted:
                target.Disposing += new EventHandler(this.OnItem_Disposing);
                break;

            case ItemsChangeOperation.Removed:
                target.Disposing -= new EventHandler(this.OnItem_Disposing);
                break;

            case ItemsChangeOperation.Clearing:
                using (RadItemCollection.RadItemEnumerator enumerator = changed.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        enumerator.Current.Disposing -= new EventHandler(this.OnItem_Disposing);
                    }
                    break;
                }
            }
        }
        private void OnItemsChanged(
            RadItemCollection changed,
            RadItem target,
            ItemsChangeOperation operation)
        {
            switch (operation)
            {
            case ItemsChangeOperation.Inserted:
                RadMenuItemBase radMenuItemBase1 = target as RadMenuItemBase;
                if (radMenuItemBase1 == null)
                {
                    break;
                }
                radMenuItemBase1.DropDownOpening += new CancelEventHandler(this.OnMenuItem_DropDownOpening);
                break;

            case ItemsChangeOperation.Removed:
                RadMenuItemBase radMenuItemBase2 = target as RadMenuItemBase;
                if (radMenuItemBase2 == null)
                {
                    break;
                }
                radMenuItemBase2.DropDownOpening -= new CancelEventHandler(this.OnMenuItem_DropDownOpening);
                break;

            case ItemsChangeOperation.Clearing:
                using (RadItemCollection.RadItemEnumerator enumerator = changed.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        RadItem current = enumerator.Current;
                        if (current is RadMenuItemBase)
                        {
                            ((RadMenuItemBase)current).DropDownOpening -= new CancelEventHandler(this.OnMenuItem_DropDownOpening);
                        }
                    }
                    break;
                }
            }
        }