Esempio n. 1
0
        /// <summary>
        /// Adds the specified item to the collection
        /// </summary>
        public void Add(RibbonButton item)
        {
            CheckRestrictions(item as RibbonButton);

            item.SetOwner(Owner);
            item.SetOwnerPanel(OwnerPanel);
            item.SetOwnerTab(OwnerTab);

            base.Add(item);
        }
        internal RibbonQuickAccessToolbar(Ribbon ownerRibbon)
        {
            if (ownerRibbon == null)
            {
                throw new ArgumentNullException("ownerRibbon");
            }

            SetOwner(ownerRibbon);

            _dropDownButton = new RibbonButton();
            _dropDownButton.SetOwner(ownerRibbon);
            _dropDownButton.SmallImage = CreateDropDownButtonImage();

            _margin  = new Padding(9);
            _padding = new Padding(3, 0, 0, 0);
            _items   = new RibbonQuickAccessToolbarItemCollection(this);
            _sensor  = new RibbonMouseSensor(ownerRibbon, ownerRibbon, Items);
            _DropDownButtonVisible = true;
        }