ToggleButtonBuilder
Defines the fluent API for configuring the Kendo UI ToggleButton
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class ToggleButtonBuilder : WidgetBuilderBase<ToggleButton, ToggleButtonBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<ToggleButton, ToggleButtonBuilder>ToggleButtonBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the ToggleButtonBuilder class.
Methods
If set to true a default overlay badge will be displayed. If set to a string, an overlay with content set to the specified string will be displayed. Can be set to a JavaScript object which represents the configuration of the Badge widget.
public ToggleButtonBuilder Badge(Action<ToggleButtonBadgeSettingsBuilder> configurator)
The ToggleButtonBadgeSettingsBuilder for the badge setting.
Returns:Returns the current instance of ToggleButtonBuilder .
Sets the HTML content of the ToggleButton.
public ToggleButtonBuilder Content(Action content)
The action which renders the HTML content.
Returns:Returns the current ToggleButtonBuilder instance.
Sets the HTML content of the ToggleButton.
public ToggleButtonBuilder Content(Func<object, object> content)
The Razor template for the HTML content.
Returns:Returns the current ToggleButtonBuilder instance.
Sets the HTML content of the Button.
public ToggleButtonBuilder Content(string content)
The HTML content.
Returns:Returns the current ToggleButtonBuilder instance.
Sets whether the component should be enabled or disabled.
public ToggleButtonBuilder Enable(bool value)
The value for Enable
Returns:Returns the current ToggleButtonBuilder instance.
Sets the end icon of the component.
public ToggleButtonBuilder EndIcon(string value)
The value for EndIcon
Returns:Returns the current ToggleButtonBuilder instance.
Configures the client-side events.
public ToggleButtonBuilder Events(Action<ToggleButtonEventBuilder> configurator)
The client events action.
Returns:Returns the current ToggleButtonBuilder instance.
Sets a value controlling how the color is applied.
public ToggleButtonBuilder FillMode(FillMode value)
The value for FillMode
Returns:Returns the current ToggleButtonBuilder instance.
Specifies a group of ToggleButtons the current instance belongs to. The string will be rendered as a value of the data-group attribute of the widget's element.
public ToggleButtonBuilder Group(string value)
The value for Group
Returns:Returns the current ToggleButtonBuilder instance.
Defines custom attributes of the ToggleButton's element.
public override ToggleButtonBuilder HtmlAttributes(IDictionary<string, object> attributes)
The value for HtmlAttributes
Returns:Returns the current ToggleButtonBuilder instance.
Overrides:
Defines custom attributes of the ToggleButton's element.
public override ToggleButtonBuilder HtmlAttributes(object attributes)
The value for HtmlAttributes
Returns:Returns the current ToggleButtonBuilder instance.
Overrides:
Sets the icon of the component.
public ToggleButtonBuilder Icon(string value)
The value for Icon
Returns:Returns the current ToggleButtonBuilder instance.
Sets the icon class of the component.
public ToggleButtonBuilder IconClass(string value)
The value for IconClass
Returns:Returns the current ToggleButtonBuilder instance.
Sets the image url for the and img element inside the component.
public ToggleButtonBuilder ImageUrl(string value)
The value for ImageUrl
Returns:Returns the current ToggleButtonBuilder instance.
Sets a value controlling the border radius.
public ToggleButtonBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current ToggleButtonBuilder instance.
Specifies the selected state of the ToggleButtons. If set to true the widget will be initially selected.
Specifies the selected state of the ToggleButtons. If set to true the widget will be initially selected.
public ToggleButtonBuilder Selected(bool value)
The value for Selected
Returns:Returns the current ToggleButtonBuilder instance.
Sets the size of the component.
public ToggleButtonBuilder Size(ButtonSize value)
The value for Size
Returns:Returns the current ToggleButtonBuilder instance.
Sets the CSS class, which will be used for applying a background image to a span element inside the component.
public ToggleButtonBuilder SpriteCssClass(string value)
The value for SpriteCssClass
Returns:Returns the current ToggleButtonBuilder instance.
Sets the ToggleButton HTML tag. A button tag is used by default.
public ToggleButtonBuilder Tag(string tag)
The name of the Html element from which the button is initialized.
Returns:Returns the current ToggleButtonBuilder instance.
Sets the color of the component according to the applied theme.
public ToggleButtonBuilder ThemeColor(ThemeColor value)
The value for ThemeColor
Returns:Returns the current ToggleButtonBuilder instance.