Kendo.Mvc.UI.Fluent.ButtonBuilder
Defines the fluent API for configuring the Kendo UI Button
Methods
Content(System.Action)
Sets the HTML content of the Button.
Parameters
content System.Action
The action which renders the HTML content.
Content(System.Func<System.Object,System.Object>)
Sets the HTML content of the Button.
Parameters
content System.Func<System.Object,System.Object>
The Razor template for the HTML content.
Content(System.String)
Sets the HTML content of the Button.
Parameters
content System.String
The HTML content.
Tag(System.String)
Sets the Button HTML tag. A button tag is used by default.
Example (ASPX)
<%= Html.Kendo().Button()
.Name("Button")
.Tag("span")
%>
Enable(System.Boolean)
Indicates whether the Button should be enabled or disabled. By default, it is enabled, unless a disabled="disabled" attribute is detected.
Parameters
value System.Boolean
The value for Enable
Icon(System.String)
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 Icons demo.
Parameters
value System.String
The value for Icon
IconClass(System.String)
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.
Parameters
value System.String
The value for IconClass
ImageUrl(System.String)
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.
Parameters
value System.String
The value for ImageUrl
SpriteCssClass(System.String)
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.
Parameters
value System.String
The value for SpriteCssClass
Events(System.Action<Kendo.Mvc.UI.Fluent.ButtonEventBuilder>)
Configures the client-side events.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.ButtonEventBuilder>
The client events action.
Example (ASPX)
@(Html.Kendo().Button()
.Name("Button")
.Events(events => events
.Click("onClick")
)
)