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

Kendo UI Badge TagHelper BadgeTagHelper class.

Definition

Child Tagsicon-settings

Constructors

Initializes a new instance of the BadgeTagHelper class.

C#
public BadgeTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

Defines the alignment of the badge

C#
public BadgeAlign? Align { get; set; }

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

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

Determines whether the textual content should be rendered as an HTML string or it should be encoded.

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

Defines how theme colors are applied to a badge

C#
public BadgeFill? FillMode { get; set; }

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.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; }

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

C#
public double? Max { get; set; }

Defines the position of the badge

C#
public BadgePosition? Position { get; set; }

Defines the shape of the badge

C#
public Rounded? Rounded { get; set; }

Defines the size of the badge

C#
public BadgeSize? Size { get; set; }

The template which renders the content of the badge.

C#
public string Template { get; set; }

The template which renders the content of the badge. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

The template which renders the content of the badge. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Configures the templates for the Badge.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

The template which renders the content of the badge. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { get; set; }

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

C#
public string Text { get; set; }

Defines the color of the badge

C#
public BadgeColor? ThemeColor { get; set; }

If set to false the badge will not be displayed.

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

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

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

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Serializes the defined templates.

C#
protected override Dictionary<string, object> SerializeTemplates()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeTemplates()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)