Class
TelerikSwitch<TValue>

The class for the Telerik Switch component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

TValue

Syntax:

cs-api-definition
public class TelerikSwitch<TValue> : TelerikInputBase<TValue>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikInputBase<TValue>TelerikSwitch<TValue>

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members TelerikInputBase<TValue>.SetParametersAsync(ParameterView)TelerikInputBase<TValue>.OnInitializedAsync()TelerikInputBase<TValue>.OnParametersSetAsync()TelerikInputBase<TValue>.Dispose()TelerikInputBase<TValue>.FocusAsync()TelerikInputBase<TValue>.CascadedEditContextTelerikInputBase<TValue>.FloatingLabelTelerikInputBase<TValue>.IdTelerikInputBase<TValue>.EnabledTelerikInputBase<TValue>.TabIndexTelerikInputBase<TValue>.ValueExpressionTelerikInputBase<TValue>.ValueChangedTelerikInputBase<TValue>.ValueTelerikInputBase<TValue>.OnChangeTelerikInputBase<TValue>.OnBlurTelerikInputBase<TValue>.AriaLabelTelerikInputBase<TValue>.AriaLabelledByTelerikInputBase<TValue>.AriaDescribedByTelerikInputBase<TValue>.ValidateOnBaseComponent.ShouldRender()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)

Constructors

TelerikSwitch()

Declaration

cs-api-definition
public TelerikSwitch()

Properties

OffLabel

Defines the off label of the switch. If not set, its value is set through the localizaiton Switch_OffLabel, or "Off" if there is no localization.

Declaration

cs-api-definition
[Parameter]
public string OffLabel { get; set; }

Property Value

string

OnLabel

Defines the on label of the switch. If not set, its value is set through the localizaiton Switch_OnLabel, or "On" if there is no localization.

Declaration

cs-api-definition
[Parameter]
public string OnLabel { get; set; }

Property Value

string

Size

Defines the size of the switch. The default value is Medium.

Declaration

cs-api-definition
[Parameter]
public string Size { get; set; }

Property Value

string

ThumbRounded

Defines the roundness of the switch thumb. The default value is Full.

Declaration

cs-api-definition
[Parameter]
public string ThumbRounded { get; set; }

Property Value

string

TrackRounded

Defines the roundness of the switch track. The default value is Full.

Declaration

cs-api-definition
[Parameter]
public string TrackRounded { get; set; }

Property Value

string

Width

Defines the width of the Component as a CSS value.

Declaration

cs-api-definition
[Parameter]
public string Width { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRender(bool)

Declaration

cs-api-definition
protected override void OnAfterRender(bool firstRender)

Parameters

firstRender

bool

Overrides ComponentBase.OnAfterRender(bool)