Badge
Kendo UI Badge component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class Badge : WidgetBase, IWidget, IHtmlAttributesContainer, IScriptableComponent
Inheritance: objectWidgetBaseBadge
Implements:
Inherited Members
Constructors
Initializes a new instance of the Badge class.
public Badge(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
The view context
initializerIJavaScriptInitializerThe JavaScriptInitializer
urlGeneratorIUrlGeneratorThe URL generator.
Properties
Defines the alignment of the badge
public BadgeAlign? Align { get; set; }
Specifies whether or not to render additional "cutout" border around the badge.
public bool? CutoutBorder { get; set; }
Determines whether the textual content should be rendered as an HTML string or it should be encoded.
public bool? Encoded { get; set; }
Defines how theme colors are applied to a badge
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.
public string Icon { get; set; }
Defines the position of the badge
public BadgePosition? Position { get; set; }
The template which renders the content of the badge.
public string Template { get; set; }
The handler for the Template
public string TemplateHandler { get; set; }
The id for the Template
public string TemplateId { get; set; }
The text of the badge. Valid input includes string, number or object with toString method. Default is empty string.
public string Text { get; set; }
Defines the color of the badge
public BadgeColor? ThemeColor { get; set; }
Methods
public override IDictionary<string, object> Serialize()
Overrides:
Writes the HTML.
protected override void WriteHtml(HtmlTextWriter writer)
The HtmlTextWriter.
Overrides:
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The TextWriter.
Overrides: