/// <summary>
        /// Adds a submenu section to the context menu. The submenu can contain its own items, separators, and submenus.
        /// </summary>
        /// <param name="id">The unique identifier of this submenu. Becomes the id attribute of the html element.</param>
        /// <param name="name">The name to display for this submenu item.</param>
        /// <returns></returns>
        public ContextMenuItem AddSubMenu(string id, string name)
        {
            ContextMenuItem submenu = new ContextMenuItem { Id = id, Name = name, Type = "submenu" };
            _items.Add(submenu);

            return submenu;
        }
Example #2
0
        /// <summary>
        /// Adds a submenu section to the context menu. The submenu can contain its own items, separators, and submenus.
        /// </summary>
        /// <param name="id">The unique identifier of this submenu. Becomes the id attribute of the html element.</param>
        /// <param name="name">The name to display for this submenu item.</param>
        /// <returns></returns>
        public ContextMenuItem AddSubMenu(string id, string name)
        {
            ContextMenuItem submenu = new ContextMenuItem {
                Id = id, Name = name, Type = "submenu"
            };

            _items.Add(submenu);

            return(submenu);
        }