ButtonBuilder
Defines the fluent API for configuring the Kendo UI Button
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class ButtonBuilder : WidgetBuilderBase<Button, ButtonBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<Button, ButtonBuilder>ButtonBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the ButtonBuilder class.
Methods
If set to true a default overlay badge will be displayed. If set to a string, an ovelay 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 ButtonBuilder Badge(Action<ButtonBadgeSettingsBuilder> configurator)
The ButtonBadgeSettingsBuilder for the badge setting.
Returns:Returns the current instance of ButtonBuilder .
If set to true a default overlay badge will be displayed. If set to a string, an ovelay 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 ButtonBuilder Badge(bool enabled)
Enables or disables the badge option.
Returns:Returns the current instance of ButtonBadgeSettingsBuilder .
Sets the value of the badge
public ButtonBuilder Badge(string value)
The value of the badge.
Returns:Returns the current ButtonBuilder instance.
Sets the HTML content of the Button.
public ButtonBuilder Content(Action content)
The action which renders the HTML content.
Returns:Returns the current ButtonBuilder instance.
Sets the HTML content of the Button.
public ButtonBuilder Content(Func<object, object> content)
The Razor template for the HTML content.
Returns:Returns the current ButtonBuilder instance.
Sets the HTML content of the Button.
public ButtonBuilder Content(string content)
The HTML content.
Returns:Returns the current ButtonBuilder instance.
Indicates whether the Button should be enabled or disabled. By default, it is enabled, unless a disabled="disabled" attribute is detected.
public ButtonBuilder Enable(bool value)
The value for Enable
Returns:Returns the current ButtonBuilder instance.
Defines a Kendo UI font or SVG icon that is rendered after the Button text.
public ButtonBuilder EndIcon(string value)
The value for EndIcon
Returns:Returns the current ButtonBuilder instance.
Configures the client-side events.
public ButtonBuilder Events(Action<ButtonEventBuilder> configurator)
The client events action.
Returns:Returns the current ButtonBuilder instance.
Sets a value controlling how the color is applied.
public ButtonBuilder FillMode(ButtonFillMode value)
The value for FillMode
Returns:Returns the current ButtonBuilder instance.
Defines a name of an existing icon in the Kendo UI theme sprite. The icon will be applied as background image of a span element inside the Button. The span element can be added automatically by the widget, or an existing element can be used, if it has a k-icon CSS class applied. For a list of available icon names, please refer to the Icon Button article.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 ButtonBuilder Icon(Action<ButtonIconSettingsBuilder> configurator)
The ButtonIconSettingsBuilder for the icon setting.
Returns:Returns the current instance of ButtonBuilder .
Defines a name of an existing icon in the Kendo UI theme sprite. The icon will be applied as background image of a span element inside the Button. The span element can be added automatically by the widget, or an existing element can be used, if it has a k-icon CSS class applied. For a list of available icon names, please refer to the Icon Button article.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 ButtonBuilder Icon(string icon)
The icon.
Returns:Returns the current instance of ButtonBuilder .
Defines a CSS class - or multiple classes separated by spaced - which are applied to a span element inside the Button. Allows the usage of custom icons.
public ButtonBuilder IconClass(string value)
The value for IconClass
Returns:Returns the current ButtonBuilder instance.
Defines a URL, which will be used for an img element inside the Button. The URL can be relative or absolute. In case it is relative, it will be evaluated with relation to the web page URL.The img element can be added automatically by the widget, or an existing element can be used, if it has a k-image CSS class applied.
public ButtonBuilder ImageUrl(string value)
The value for ImageUrl
Returns:Returns the current ButtonBuilder instance.
Sets a value controlling the border radius.
public ButtonBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current ButtonBuilder instance.
Controls the overall physical size of a button. Valid values are: "xsmall", "small", "medium", and "large". When undefined (the default), the theme controls the default size.The "none" value is deprecated. Use custom CSS to customize the size.
public ButtonBuilder Size(ButtonSize value)
The value for Size
Returns:Returns the current ButtonBuilder instance.
Defines a CSS class (or multiple classes separated by spaces), which will be used for applying a background image to a span element inside the Button. In case you want to use an icon from the Kendo UI theme sprite background image, it is easier to use the icon property.The span element can be added automatically by the widget, or an existing element can be used, if it has a k-sprite CSS class applied.
public ButtonBuilder SpriteCssClass(string value)
The value for SpriteCssClass
Returns:Returns the current ButtonBuilder instance.
Sets the Button HTML tag. A button tag is used by default.
public ButtonBuilder Tag(string tag)
The name of the Html element from which the button is initialized.
Returns:Returns the current ButtonBuilder instance.
Sets the color of the component according to the applied theme.
public ButtonBuilder ThemeColor(ThemeColor value)
The value for ThemeColor
Returns:Returns the current ButtonBuilder instance.