public static void AddButton(RibbonQuickAccessToolbar toolbar, AbstractCommand command) { if (toolbar.IsNull() || command.IsNull()) { throw new ArgumentNullException(); } toolbar.Items.Add(new RibbonButtonEx(command)); CommandManager.Instance.Register(command); }
public static void AddOrbMenuItem(Utils.Controls.Ribbon.Ribbon ribbon, AbstractCommand command) { if (ribbon.IsNull() || command.IsNull()) { throw new ArgumentNullException(); } var orbMenuItem = new RibbonOrbMenuItemEx(command); ribbon.OrbDropDown.MenuItems.Add(orbMenuItem); CommandManager.Instance.Register(command); }