tangxu
2024-11-04 ebd031e3bed6c1cfddce8fc9b98f7f9e95fb9e32
WinFrmUI/DPumpHydr.WinFrmUI.Ribbon/Classes/Collections/RibbonItemCollection.cs
@@ -435,7 +435,6 @@
            int y = rectangle.Top + (rectangle.Height - GetItemsHeight()) / 2;
            MoveTo(items, new Point(x, y));
        }
        /// <summary>
@@ -475,7 +474,7 @@
                // A DropDown menu
                //if (item is RibbonDescriptionMenuItem)
                //{
                //    throw new ApplicationException("The only style supported by the RibbonButtonList is Normal");
                //    throw new ArgumentException("The only style supported by the RibbonButtonList is Normal", nameof(item));
                //}
            }
            else
@@ -483,7 +482,7 @@
                // A Panel
                if (item is RibbonDescriptionMenuItem)
                {
                    throw new ApplicationException("The RibbonDescriptionMenuItem item is not supported on a panel");
                    throw new ArgumentException("The RibbonDescriptionMenuItem item is not supported on a panel", nameof(item));
                }
            }
        }
@@ -509,8 +508,6 @@
        /// <param name="items">Items to add</param>
        public override void AddRange(IEnumerable<RibbonItem> items)
        {
            foreach (RibbonItem item in items)
            {
                CheckRestrictions(item);
@@ -537,6 +534,7 @@
            item.SetOwner(Owner);
            item.SetOwnerPanel(OwnerPanel);
            item.SetOwnerTab(OwnerTab);
            item.SetOwnerItem(OwnerItem);
            base.Insert(index, item);
        }