New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI ButtonGroupItem TagHelper ButtonGroupItemTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("item", ParentTag = "buttongroup-items", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("badge", new string[] { "icon" })]
[SuppressTagRendering]
public class ButtonGroupItemTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseButtonGroupItemTagHelper

Implements: ITagHelperITagHelperComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-buttongroup name="buttongroup">
    <buttongroup-items>
        <item text="Button with Badge">
            <badge text="1" />
        </item>
    </buttongroup-items>
</kendo-buttongroup>

Child Tagsbadgeicon

Constructors

Initializes a new instance of the ButtonGroupItemTagHelper class.

C#
public ButtonGroupItemTagHelper()

Properties

If set to true a default overlay badge will be displayed. If set to a string, an ovelay with content set to the specified string will be displayed. Can be set to a JavaScript object which represents the configuration of the Badge widget.

C#
[HtmlAttributeName("badge")]
public string BadgeValue { get; set; }

Specifies if a button is enabled.

C#
public bool? Enabled { get; set; }

Specifies if text field of the ButtonGroup item should be encoded.

C#
public bool? Encoded { get; set; }

Defines the name of an existing icon in a Kendo theme that is rendered after the text of the item.

C#
public string EndIcon { get; set; }

Specifies the HTML attributes of a ButtonGroup item.

C#
public IDictionary<string, object> HtmlAttributes { get; set; }

Defines the name of an existing icon in a Kendo theme.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.

C#
[HtmlAttributeName("icon")]
public string Icon { get; set; }

Allows the usage of custom icons. Defines CSS classes which are to be applied to a span element inside the ButtonGroup item.

C#
public string IconClass { get; set; }

If set, the ButtonGroup will render an image with the specified URL in the button.

C#
public string ImageUrl { get; set; }

Specifies if a button is initially selected.

C#
public bool? Selected { get; set; }

Specifies the text of the ButtonGroup item.

C#
public string Text { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serialize method.

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>