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

Kendo UI ToggleButton TagHelper ToggleButtonTagHelper class.

Definition

Child Tagsbadge

Constructors

Initializes a new instance of the ToggleButtonTagHelper class.

C#
public ToggleButtonTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

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; }

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; }

The name of the JavaScript function that will handle the click event. Fires when the Button is clicked with the mouse, touched on a touch device, or ENTER (or SPACE) is pressed while the Button is focused.

C#
public string OnClick { get; set; }

The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the Button is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnKendoKeydown { get; set; }

The name of the JavaScript function that will handle the toggle event. Fires when the ToggleButton selected state is toggled.

C#
public string OnToggle { 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; }

Sets the HTML tag to be rendered by the Button. Renders a button tag by default.

C#
public string Tag { get; set; }

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

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

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

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

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

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

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)