Class SfSwitch<TChecked>
The Switch is a graphical user interface element that allows you to toggle between checked and unchecked states.
Inheritance
System.Object
Syncfusion.Blazor.SfBaseComponent
SfInputBase<TChecked>
SfSwitch<TChecked>
Inherited Members
Syncfusion.Blazor.Buttons.SfInputBase<TChecked>.Click()
Syncfusion.Blazor.Buttons.SfInputBase<TChecked>.ChildContent
Syncfusion.Blazor.Buttons.SfInputBase<TChecked>.CheckedChanged
Syncfusion.Blazor.Buttons.SfInputBase<TChecked>.CheckedExpression
Syncfusion.Blazor.Buttons.SfInputBase<TChecked>.EnableHtmlSanitizer
Syncfusion.Blazor.Buttons.SfInputBase<TChecked>.Locale
Syncfusion.Blazor.Buttons.SfInputBase<TChecked>.HtmlAttributes
Namespace: Syncfusion.Blazor.Buttons
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfSwitch<TChecked> : SfInputBase<TChecked>
Type Parameters
Name | Description |
---|---|
TChecked |
Constructors
SfSwitch()
Declaration
public SfSwitch()
Properties
OffLabel
Specifies a text that indicates the Switch is in unchecked state.
Declaration
public string OffLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String |
OnLabel
Specifies a text that indicates the Switch is in checked state.
Declaration
public string OnLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ValueChange
Triggers when Switch state has been changed by user interaction.
Declaration
public EventCallback<ChangeEventArgs<TChecked>> ValueChange { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ChangeEventArgs<TChecked>> |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
InitRender()
Declaration
protected override void InitRender()
Overrides
Syncfusion.Blazor.Buttons.SfInputBase<TChecked>.InitRender()