MenuItemTagHelper
Kendo UI MenuItem TagHelper MenuItemTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("menu-item", ParentTag = "items", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("menu-item", ParentTag = "sub-items", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("sub-items", new string[] { "content", "icon" })]
[OutputElementHint("li")]
public class MenuItemTagHelper : AnchorTagHelper, ITagHelper, ITagHelperComponent, INavigationItem
Inheritance: objectTagHelperAnchorTagHelperMenuItemTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-menu name="menu">
<items>
<menu-item text="Parent Item">
<sub-items>
<menu-item text="Child Item"></menu-item>
</sub-items>
</menu-item>
</items>
</kendo-menu>
Child Tags
Constructors
MenuItemTagHelper method.
public MenuItemTagHelper(IHtmlGenerator generator, IAuthorizationService authorizationService, IAuthorizationPolicyProvider policyProvider, IActionDescriptorCollectionProvider actionDescriptorCollection, IIconBuilder iconBuilder)
Properties
Specifies the actions content of the menu item, such as keyboard shortcuts.
public string Actions { get; set; }
The collection of child items for the menu item.
[HtmlAttributeNotBound]
public IEnumerable<MenuItemBase> Children { get; set; }
The content of the menu item.
[HtmlAttributeNotBound]
public string Content { get; set; }
Implements:
The HTML attributes for the content of the menu item.
[HtmlAttributeNotBound]
public object ContentHtmlAttributes { get; set; }
Implements:
Specifies the description of the menu item.
public string Description { get; set; }
Specifies whether the item is initially enabled
public bool? Enabled { get; set; }
Implements:
Specifies whether the item's text is encoded
public bool? Encoded { get; set; }
Implements:
If set to true, the item is rendered as a decorative, non-interactive group header instead of a regular selectable menu item.
public bool? GroupHeader { get; set; }
Specifies the font icon displayed by the item. https://docs.telerik.com/kendo-ui/styles-and-layout/icons-web
public string Icon { get; set; }
Implements:
Specifies custom class name for the icon displayed by the item
public string IconClass { get; set; }
Implements:
Specifies the icon position for the item.
public IconPosition IconPosition { get; set; }
Specifies the HTML attributes of the image
public object ImageHtmlAttributes { get; set; }
Implements:
Specifies the URL of the image displayed by the item
public string ImageUrl { get; set; }
Implements:
Specifies the HTML attributes of the link
public object LinkHtmlAttributes { get; set; }
Implements:
Specifies whether the item is initially selected
public bool? Selected { get; set; }
Implements:
Specifies whether the item is a separator
public bool? Separator { get; set; }
Implements:
Methods
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides: