New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the SwitchMessagesSettings.

Definition

Namespace:Kendo.Mvc.UI

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class SwitchMessagesSettingsBuilder

Inheritance: objectSwitchMessagesSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Provides options for changing the text values of the component

C#
public SwitchMessagesSettingsBuilder(SwitchMessagesSettings settings)
Parameters:settingsSwitchMessagesSettings

The options for setting the new text content.

Example:
C#
@(Html.Kendo().Switch()
.Name("switch")
.Messages(m => m.Checked("Yes"))
)

Methods

Defines the text for the turned on state

C#
public SwitchMessagesSettingsBuilder Checked(string message)
Parameters:messagestring

The new text for the turned on state.

Returns:

SwitchMessagesSettingsBuilder

Example:
C#
@(Html.Kendo().Switch()
.Name("switch")
.Messages(m => m.Checked("Yes"))
)

Defines the text for the turned off state

C#
public SwitchMessagesSettingsBuilder Unchecked(string message)
Parameters:messagestring

The new text for the turned off state.

Returns:

SwitchMessagesSettingsBuilder

Example:
C#
@(Html.Kendo().Switch()
.Name("switch")
.Messages(m => m.Unchecked("No"))
)