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

ButtonGroupItemBadgeBuilder

Methods

ThemeColor(Kendo.Mvc.UI.BadgeColor)

Specifies the color of the component. Valid options are inherit, default, primary, secondary, tertiary, info, success, warning, error, dark, light, inverted.

Parameters

value - BadgeColor

The value for Color

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.ThemeColor(BadgeColor.Primary));
                   })
            )

CutoutBorder(System.Boolean)

Specifies wether or not to render additional "cutout" border around the badge.

Parameters

value - System.Boolean

The value for CutoutBorder

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.CutoutBorder(true));
                   })
            )

CutoutBorder()

Specifies wether or not to render additional "cutout" border around the badge.

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.CutoutBorder(true));
                   })
            )

Icon(System.String)

Defines the name for an existing icon in a Kendo UI theme or SVG content. The icon is rendered inside the badge by a span.k-icon or span.k-svg-icon element.

Parameters

value - System.String

The value for Icon

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Icon("camera"));
                   })
            )

Max(System.Double)

If text is a number, it will cap that number.

Parameters

value - System.Double

The value for Max

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Max(100));
                   })
            )

Position(Kendo.Mvc.UI.BadgePosition)

Specifies position of the badge relative to button. Valid position options are: inline, top start, top end, bottom start, bottom end. works in conjunction with items.badge.placement.

Parameters

value - BadgePosition

The value for Position

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Position(BadgePosition.Inside));
                   })
            )

Shape(Kendo.Mvc.UI.BadgeShape)

Specifies the shape of the badge. Valid options are: rectangle, rounded, pill, circle, dot.

Parameters

value - BadgeShape

The value for Shape

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Shape(BadgeShape.Circle));
                   })
            )

Size(Kendo.Mvc.UI.BadgeSize)

Specifies the size of the badge. Valid options are small, medium and large.

Parameters

value - BadgeSize

The value for Shape

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Size(BadgeSize.Medium));
                   })
            )

Text(System.String)

The text of the badge. Valid input includes string, number or object with toString method. Default is empty string.

Parameters

value - System.String

The value for Text

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Text("test"));
                   })
            )

Template(System.String)

The template which renders the content of the badge

Parameters

value - System.String

The value for Template

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Template("template"));
                   })
            )

TemplateId(System.String)

The template which renders the content of the badge

Parameters

templateId - System.String

The ID of the template element for Template

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.TemplateId("templateId"));
                   })
            )

TemplateView(System.Web.Mvc.MvcHtmlString)

The template which renders the content of the badge

Parameters

value - System.Web.Mvc.MvcHtmlString

The name of the view for the Template value

TemplateHandler(System.String)

Parameters

value - System.String

Visible(System.Boolean)

If set to false the badge will not be displayed.

Parameters

value - System.Boolean

The value for Visible

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Visible(false));
                   })
            )

Align(Kendo.Mvc.UI.BadgeAlign)

Defines the alignment of the badge

Parameters

value - BadgeAlign

The value that configures the align.

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Align(BadgeAlign.TopEnd));
                   })
            )

Fill(Kendo.Mvc.UI.BadgeFill)

Defines how theme colors are applied to a badge

Parameters

value - BadgeFill

The value that configures the fill.

Example


            @(Html.Kendo().ButtonGroup()
                   .Name("select-period")
                   .Items(t =>
                   {
                       t.Add().Text("Month").Badge(b => b.Fill(BadgeFill.Solid));
                   })
            )

In this article
Not finding the help you need?