kendoSwitch
Namespace: Wisej.Web.Ext.Kendo
Assembly: Wisej.Web.Ext.Kendo (4.1.0.0)
The Switch displays two exclusive choices.
- C#
- VB.NET
public class kendoSwitch : kendoBase
Public Class kendoSwitch
Inherits kendoBase
Constructors
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);
kendoSwitch(options)
Constructs a new instance of the kendoSwitch class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial 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);