Kendo UI DropDownButtonItem TagHelper DropDownButtonItemTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("item", ParentTag = "dropdownbutton-items", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("icon", new string[] { })]
[SuppressTagRendering]
public class DropDownButtonItemTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseDropDownButtonItemTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-dropdownbutton name="dropdownbutton">
<dropdownbutton-items>
<item text="Item 1" click="onItemClick"></item>
</dropdownbutton-items>
</kendo-dropdownbutton>
<script>
function onItemClick(){
//handler logic here
}
</script>
Child Tags
Constructors
Initializes a new instance of the DropDownButtonItemTagHelper class.
public DropDownButtonItemTagHelper()
Properties
Adds a custom data callback to be added to the context of menu item - useful to attach context dynamically.
public string Data { get; set; }
Adds custom attributes to the LI element of the menu button.
public IDictionary<string, object> HtmlAttributes { get; set; }
Specifies the icon of the item.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.
[HtmlAttributeName("icon")]
public string Icon { get; set; }
Specifies custom css class added to the sprite icon element of the item.
public string SpriteCssClass { get; set; }
Methods
Adds the current TagHelper instance to its parent TagHelper.
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.