SwitchBuilder
Defines the fluent API for configuring the Kendo UI Switch
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class SwitchBuilder : WidgetBuilderBase<Switch, SwitchBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<Switch, SwitchBuilder>SwitchBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the SwitchBuilder class.
Methods
The checked state of the Switch.
The checked state of the Switch.
public SwitchBuilder Checked(bool value)
The value for Checked
Returns:Returns the current SwitchBuilder instance.
If set to false, the Switch will be disabled and will not allow the user to change its checked state.
public SwitchBuilder Enabled(bool value)
The value for Enabled
Returns:Returns the current SwitchBuilder instance.
Configures the client-side events.
public SwitchBuilder Events(Action<SwitchEventBuilder> configurator)
The client events action.
Returns:Returns the current SwitchBuilder instance.
Defines the text of the checked and unchecked labels that are displayed within the Switch. All labels support localization.
public SwitchBuilder Messages(Action<SwitchMessagesSettingsBuilder> configurator)
The SwitchMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of SwitchBuilder .
If set to true, the Switch will render into its read-only state.
If set to true, the Switch will render into its read-only state.
public SwitchBuilder Readonly(bool value)
The value for Readonly
Returns:Returns the current SwitchBuilder instance.
Sets the size of the component.
public SwitchBuilder Size(ComponentSize value)
The value for Size
Returns:Returns the current SwitchBuilder instance.
Sets a value controlling the thumb's border radius.
public SwitchBuilder ThumbRounded(Rounded value)
The value for ThumbRounded
Returns:Returns the current SwitchBuilder instance.
Sets a value controlling the track's border radius.
public SwitchBuilder TrackRounded(Rounded value)
The value for TrackRounded
Returns:Returns the current SwitchBuilder instance.
The width of the Switch.
public SwitchBuilder Width(double value)
The value for Width
Returns:Returns the current SwitchBuilder instance.