示例#1
0
        public MenuTree GetItems(MenuDisplayMode mode)
        {
            MenuTree tree = new MenuTree(Id, Title);

            tree.AddRange <MenuItemBase>(this.Where((item) => item.Mode.HasFlag(mode)));

            return(tree);
        }
示例#2
0
        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);
        }