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

Kendo UI ToggleButton component

Definition

Constructors

Initializes a new instance of the ToggleButton class.

C#
public ToggleButton(ViewContext viewContext)
Parameters:viewContextViewContext

Properties

If set to true a default overlay badge will be displayed. If set to a string, an overlay with content set to the specified string will be displayed. Can be set to a JavaScript object which represents the configuration of the Badge widget.

C#
public ToggleButtonBadgeSettings Badge { get; }

Content member.

C#
public Func<object, object> Content { get; set; }

ContentAction member.

C#
public Action ContentAction { get; set; }

Sets whether the component should be enabled or disabled.

C#
public bool? Enable { get; set; }

Sets the end icon of the component.

C#
public string EndIcon { get; set; }

Sets a value controlling how the color is applied.

C#
public FillMode? FillMode { get; set; }

Specifies a group of ToggleButtons the current instance belongs to. The string will be rendered as a value of the data-group attribute of the widget's element.

C#
public string Group { get; set; }

Html member.

C#
public string Html { get; set; }

Sets the icon of the component.

C#
public string Icon { get; set; }

Sets the icon class of the component.

C#
public string IconClass { get; set; }

Sets the image url for the and img element inside the component.

C#
public string ImageUrl { get; set; }

Sets a value controlling the border radius.

C#
public Rounded? Rounded { get; set; }

Specifies the selected state of the ToggleButtons. If set to true the widget will be initially selected.

C#
public bool? Selected { get; set; }

Sets the size of the component.

C#
public ButtonSize? Size { get; set; }

Sets the CSS class, which will be used for applying a background image to a span element inside the component.

C#
public string SpriteCssClass { get; set; }

Tag member.

C#
public string Tag { get; set; }

Sets the color of the component according to the applied theme.

C#
public ThemeColor? ThemeColor { get; set; }

Methods

Serializes the component settings to a dictionary.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

A dictionary of settings.

Overrides: WidgetBase.Serialize()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: WidgetBase.SerializeSettings()

Writes the HTML.

C#
protected override void WriteHtml(TextWriter writer)
Parameters:writerTextWriter

Overrides: WidgetBase.WriteHtml(TextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)