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