protected Menu (MenuItem[] items) { menu_items = new MenuItemCollection (this); if (items != null) menu_items.AddRange (items); }
private void SortedAdd(MenuItemCollection items, Command cmd) { items.Add(cmd); var ordered = items.OrderBy(ButtonMenuItemComparer.Prepare).ToArray(); items.Clear(); items.AddRange(ordered); }
internal static MenuItemCollection ToMenuItemCollection(this IEnumerable <MenuItemViewModel> collection) { var result = new MenuItemCollection(); result.AddRange(collection); return(result); }
protected Menu(MenuItem[] items) { menu_items = new MenuItemCollection(this); if (items != null) { menu_items.AddRange(items); } }