Switch
Kendo UI Switch component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class Switch : WidgetBase, IHtmlAttributesContainer, IFormEditor
Inheritance: objectWidgetBaseSwitch
Implements:
Inherited Members
Constructors
Initializes a new instance of the Switch class.
Properties
If set to false, the Switch will be disabled and will not allow the user to change its checked state.
public bool? Enabled { get; set; }
Defines the text of the checked and unchecked labels that are displayed within the Switch. All labels support localization.
public SwitchMessagesSettings Messages { get; }
If set to true, the Switch will render into its read-only state.
public bool? Readonly { get; set; }
Sets the size of the component.
public ComponentSize? Size { get; set; }
Sets a value controlling the thumb's border radius.
public Rounded? ThumbRounded { get; set; }
Sets a value controlling the track's border radius.
public Rounded? TrackRounded { get; set; }
Methods
Serializes the component settings to a dictionary.
public override IDictionary<string, object> Serialize()
A dictionary of settings.
Overrides:
Implements:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML.
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The TextWriter.
Overrides: