Kendo UI ToolBarItemButton TagHelper ToolBarItemButtonTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("toolbar-button", ParentTag = "buttons", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("icon", new string[] { })]
[OutputElementHint("div")]
[SuppressTagRendering]
public class ToolBarItemButtonTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseToolBarItemButtonTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-toolbar name="toolbar">
<toolbar-items>
<item>
<buttons>
<toolbar-button click="handler" text="Button"></toolbar-button>
</buttons>
</item>
</toolbar-items>
</kendo-toolbar>
<script>
function handler(e) {
//handler code
}
</script>
Child Tags
Constructors
Initializes a new instance of the ToolBarItemButtonTagHelper class.
public ToolBarItemButtonTagHelper()
Properties
Specifies the click event handler of the button. Applicable only for the children of a ButtonGroup.
public string Click { get; set; }
Specifies whether the button is initially enabled or disabled.
public bool? Enable { get; set; }
Assigns the button to a group. Applicable only for the children of a ButtonGroup that has togglable true.
public string Group { get; set; }
Determines if the button is visible or hidden. By default the buttons are visible.
public bool? Hidden { get; set; }
HtmlAttributes
dynamic
Specifies the HTML attributes of a ToolBar button.
public dynamic HtmlAttributes { get; set; }
Sets icon for the menu button. The icon should be one of the existing in the Kendo UI theme sprite.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; }
If set, the ToolBar will render an image with the specified URL in the button.
public string ImageUrl { get; set; }
Specifies if the toggle button is initially selected. Applicable only for the children of a ButtonGroup that has togglable true.
public bool? Selected { get; set; }
Specifies where the icon of the button will be displayed. Applicable only for the children of a ButtonGroup.
public ShowIn? ShowIcon { get; set; }
Specifies where the text of the menu button will be displayed. Applicable only for the buttons of a ButtonGroup.
public ShowIn? ShowText { get; set; }
Defines a CSS class (or multiple classes separated by spaces) which will be used for button icon.
public string SpriteCssClass { get; set; }
Specifies if the button is togglable, e.g. has a selected and unselected state. Applicable only for the children of a ButtonGroup.
public bool? Togglable { get; set; }
Specifies the toggle event handler of the button. Applicable only for the children of a ButtonGroup.
public string Toggle { 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.