public MenuTree GetItems(MenuDisplayMode mode) { MenuTree tree = new MenuTree(Id, Title); tree.AddRange <MenuItemBase>(this.Where((item) => item.Mode.HasFlag(mode))); return(tree); }
public SubMenu SubmenuButton(MenuDisplayMode displayMode, string id, string name, MenuTree menuTree, string description = null) { var submenuButton = new SubMenu(displayMode, id, name) .NavigatesTo(menuTree) .WithDescription(description); Add(submenuButton); return(submenuButton as SubMenu); }