BadgeBuilder
Defines the fluent API for configuring the Telerik UI Badge for ASP.NET Core.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class BadgeBuilder : WidgetBuilderBase<Badge, BadgeBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<Badge, BadgeBuilder>BadgeBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the BadgeBuilder class.
Methods
Defines the alignment of the badge
public BadgeBuilder Align(BadgeAlign value)
The value for Align
Returns:Returns the current BadgeBuilder instance.
Specifies whether or not to render additional "cutout" border around the badge.
Specifies whether or not to render additional "cutout" border around the badge.
public BadgeBuilder CutoutBorder(bool value)
The value for CutoutBorder
Returns:Returns the current BadgeBuilder instance.
Determines whether the textual content should be rendered as an HTML string or it should be encoded.
public BadgeBuilder Encoded(bool value)
The value for Encoded
Returns:Returns the current BadgeBuilder instance.
Defines how theme colors are applied to a badge
public BadgeBuilder FillMode(BadgeFill value)
The value for FillMode
Returns:Returns the current BadgeBuilder instance.
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.
public BadgeBuilder Icon(Action<BadgeIconSettingsBuilder> configurator)
The BadgeIconSettingsBuilder for the icon setting.
Returns:Returns the current instance of BadgeBuilder .
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.
public BadgeBuilder Icon(string icon)
The value for Icon
Returns:Returns the current instance of BadgeBuilder .
If text is a number, it will cap that number.
public BadgeBuilder Max(double value)
The value for Max
Returns:Returns the current BadgeBuilder instance.
Defines the position of the badge
public BadgeBuilder Position(BadgePosition value)
The value for Position
Returns:Returns the current BadgeBuilder instance.
Defines the shape of the badge
public BadgeBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current BadgeBuilder instance.
Defines the size of the badge
public BadgeBuilder Size(BadgeSize value)
The value for Size
Returns:Returns the current BadgeBuilder instance.
The template which renders the content of the badge.
public BadgeBuilder Template(string value)
The value for Template
Returns:Returns the current BadgeBuilder instance.
The template which renders the content of the badge.
public BadgeBuilder Template<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the template.
Returns:Returns the current BadgeBuilder instance.
The template which renders the content of the badge.
public BadgeBuilder TemplateHandler(string templateHandler)
The handler that returs the template for Template
Returns:Returns the current BadgeBuilder instance.
The template which renders the content of the badge.
public BadgeBuilder TemplateId(string templateId)
The ID of the template element for Template
Returns:Returns the current BadgeBuilder instance.
The template which renders the content of the badge.
public BadgeBuilder TemplateView(IHtmlContent templateView)
The view that contains the template for Template
Returns:Returns the current BadgeBuilder instance.
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.
public BadgeBuilder Text(float value)
The value for Text option.
Returns:Returns the current BadgeBuilder instance.
The text of the badge. Valid input includes string, number or object with toString method. Default is empty string.
public BadgeBuilder Text(string value)
The value for Text
Returns:Returns the current BadgeBuilder instance.
Defines the color of the badge
public BadgeBuilder ThemeColor(BadgeColor value)
The value for ThemeColor
Returns:Returns the current BadgeBuilder instance.
If set to false the badge will not be displayed.
public BadgeBuilder Visible(bool value)
The value for Visible
Returns:Returns the current BadgeBuilder instance.