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

BadgeBuilder

Properties

WriteAction - Func

Methods

Text(System.Single)

The text of the Badge. The valid input includes a string, number, or object with the 'toString()' method. The default value is an empty string.

Parameters

value - System.Single

The value for Text option.

Example


            @(Html.Kendo().Badge()
                .Name("badge")
                .Text("100")
            )

CutoutBorder(System.Boolean)

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

Parameters

value - System.Boolean

The value for CutoutBorder

CutoutBorder()

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

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.See web font icons help article for more details on Kendo UI icons.

Parameters

value - System.String

The value for Icon

Max(System.Double)

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

Parameters

value - System.Double

The value for Max

Template(System.String)

The template which renders the content of the badge.

Parameters

value - System.String

The value for 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

TemplateView(Microsoft.AspNetCore.Html.IHtmlContent)

The template which renders the content of the badge.

Parameters

templateView - Microsoft.AspNetCore.Html.IHtmlContent

The view that contains the template for Template

TemplateHandler(System.String)

The template which renders the content of the badge.

Parameters

templateHandler - System.String

The handler that returs the template for Template

Template(Kendo.Mvc.UI.TemplateBuilder)

The template which renders the content of the badge.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the template.

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

Visible(System.Boolean)

If set to false the badge will not be displayed.

Parameters

value - System.Boolean

The value for Visible

Size(Kendo.Mvc.UI.BadgeSize)

Defines the size of the badge

Parameters

value - BadgeSize

The value for Size

Align(Kendo.Mvc.UI.BadgeAlign)

Defines the alignment of the badge

Parameters

value - BadgeAlign

The value for Align

Position(Kendo.Mvc.UI.BadgePosition)

Defines the position of the badge

Parameters

value - BadgePosition

The value for Position

Rounded(Kendo.Mvc.UI.Rounded)

Defines the rounded appearance of the badge

Parameters

value - Rounded

The value that configures the rounding of the badge.

ThemeColor(Kendo.Mvc.UI.BadgeColor)

Defines the color of the badge

Parameters

value - BadgeColor

The value for ThemeColor

FillMode(Kendo.Mvc.UI.BadgeFill)

Defines how theme colors are applied to a badge

Parameters

value - BadgeFill

The value for Fill

ToComponent()

Returns the internal view component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

Render()

Renders the component in place.

ToHtmlString()

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

AsChildComponent()

Configures the widget as a child component.

In this article
Not finding the help you need?