Example #1
0
 /// <summary>
 /// Creates a new RibbonPanel with the specified text and panel flow direction
 /// </summary>
 /// <param name="text">Text of the panel</param>
 /// <param name="flowsTo">Flow direction of the content items</param>
 public RibbonPanel(string text, RibbonPanelFlowDirection flowsTo, IEnumerable <RibbonItem> items)
     : this()
 {
     _text    = text;
     _flowsTo = flowsTo;
     _items.AddRange(items);
 }
Example #2
0
        public RibbonButtonList(IEnumerable <RibbonButton> buttons, IEnumerable <RibbonItem> dropDownItems)
            : this()
        {
            if (buttons != null)
            {
                List <RibbonButton> items = new List <RibbonButton>(buttons);

                _buttons.AddRange(items.ToArray());

                //add the handlers
                foreach (RibbonItem item in buttons)
                {
                    item.Click += new EventHandler(item_Click);
                }
            }

            if (dropDownItems != null)
            {
                _dropDownItems.AddRange(dropDownItems);

                //add the handlers
                foreach (RibbonItem item in dropDownItems)
                {
                    item.Click += new EventHandler(item_Click);
                }
            }
        }
Example #3
0
        public RibbonButtonList(IEnumerable <RibbonButton> buttons, IEnumerable <RibbonItem> dropDownItems)
            : this()
        {
            if (buttons != null)
            {
                List <RibbonButton> items = new List <RibbonButton>(buttons);

                _buttons.AddRange(items.ToArray());
            }

            if (dropDownItems != null)
            {
                _dropDownItems.AddRange(dropDownItems);
            }
        }