Class RadzenSwitch
RadzenSwitch component.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenSwitch : FormComponent<bool>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
Examples
<RadzenSwitch @bind-Value=@value Change=@(args => Console.WriteLine($"Value: {args}")) />
Constructors
RadzenSwitch()
RadzenSwitch component.
Declaration
public RadzenSwitch()
Examples
<RadzenSwitch @bind-Value=@value Change=@(args => Console.WriteLine($"Value: {args}")) />
Properties
InputAttributes
Specifies additional custom attributes that will be rendered by the input.
Declaration
[Parameter]
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, object> | The attributes. |
ReadOnly
Gets or sets a value indicating whether is read only.
Declaration
[Parameter]
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
Methods
BuildRenderTree(RenderTreeBuilder)
RadzenSwitch component.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | __builder |
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
string |
Overrides
Toggle()
Toggles this instance checked state.
Declaration
public Task Toggle()
Returns
Type | Description |
---|---|
Task |