Skip to main content

kendoSwitch

Namespace: Wisej.Web.Ext.Kendo

Assembly: Wisej.Web.Ext.Kendo (4.1.0.0)

The Switch displays two exclusive choices.

public class kendoSwitch : kendoBase

Constructors​

Instance member kendoSwitch()​

Constructs a new instance of the kendoSwitch class.

Example:

The following example creates a switch and turns it on through the Options property. The Kendo UI option is named checked, which is a C# keyword and must be written as @checked.

var toggle = new kendoSwitch();
toggle.Options.@checked = true;
this.Controls.Add(toggle);

Instance member kendoSwitch(options)​

Constructs a new instance of the kendoSwitch class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a switch that is initially on and shows custom labels. The Kendo UI options checked and unchecked are C# keywords and must be written with the @ prefix.

var toggle = new kendoSwitch(new
{
@checked = true,
messages = new { @checked = "ON", @unchecked = "OFF" }
});
this.Controls.Add(toggle);

Implements​