ToolBarItemTagHelper
Kendo UI ToolBarItem TagHelper ToolBarItemTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("item", ParentTag = "toolbar-items", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("item", ParentTag = "floatingtoolbar-items", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("buttons", new string[] { "menu-buttons", "item-overflow-template", "item-template", "icon" })]
[OutputElementHint("div")]
[SuppressTagRendering]
public class ToolBarItemTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent, ITemplateComponent
Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseToolBarItemTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-toolbar name="toolbar">
<toolbar-items>
<item>
<buttons>
<toolbar-button text="Button 1"></toolbar-button>
<toolbar-button text="Button 2"></toolbar-button>
</buttons>
</item>
</toolbar-items>
</kendo-toolbar>
Child Tags
Constructors
Initializes a new instance of the ToolBarItemTagHelper class.
public ToolBarItemTagHelper()
Properties
Specifies the click event handler of the button. Applicable only for commands of type button and splitButton.
public string Click { get; set; }
Specifies whether the control is initially enabled or disabled. Default value is "true".
public bool? Enable { get; set; }
Assigns the button to a group. Applicable only for buttons with togglable: true.
public string Group { get; set; }
Determines if a button is visible or hidden. By default 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 item. 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 how the button behaves when the ToolBar is resized.
public ShowInOverflowPopup? Overflow { get; set; }
Specifies what element will be added in the command overflow popup. Applicable only for items that have a template.
public string OverflowTemplate { get; set; }
Specifies what element will be added in the command overflow popup. Applicable only for items that have a template. This option expects the name of a JavaScript function that will be called to return the template.
public string OverflowTemplateHandler { get; set; }
Specifies what element will be added in the command overflow popup. Applicable only for items that have a template. This option expects the ID of the script element that contains the template.
public string OverflowTemplateId { get; set; }
Specifies what element will be added in the command overflow popup. Applicable only for items that have a template. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent OverflowTemplateView { get; set; }
Specifies whether the button is primary. Primary buttons receive different styling.
public bool? Primary { get; set; }
Specifies if the toggle button is initially selected. Applicable only for buttons with togglable: true.
public bool? Selected { 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 what element will be added in the ToolBar wrapper. Items with template does not have a type.
public string Template { get; set; }
Specifies what element will be added in the ToolBar wrapper. Items with template does not have a type.
public string TemplateHandler { get; set; }
Specifies what element will be added in the ToolBar wrapper. Items with template does not have a type.
public string TemplateId { get; set; }
Templates member.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
Specifies what element will be added in the ToolBar wrapper. Items with template does not have a type.
public IHtmlContent TemplateView { get; set; }
Specifies if the button is togglable, e.g. has a selected and unselected state.
public bool? Togglable { get; set; }
Specifies the toggle event handler of the button. Applicable only for commands of type button and togglable: true.
public string Toggle { get; set; }
Specifies the type of the item.
public CommandType? Type { get; set; }
Methods
Adds the current instance to the parent.
protected override void AddSelfToParent(TagHelperContext context)
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.