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

            tree.AddRange <MenuItem>(this.Where((item) => {
                return(item.Mode.HasFlag(mode));
            }));

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