Class RadzenToggleButton
RadzenButton component.
public class RadzenToggleButton : RadzenButton, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
- Inheritance
-
RadzenToggleButton
- Implements
- Inherited Members
Examples
<RadzenToggleButton Click=@(args => Console.WriteLine("Button clicked")) Text="ToggleButton" />
Constructors
RadzenToggleButton()
public RadzenToggleButton()
Fields
_value
The value
protected bool _value
Field Value
Properties
Change
Gets or sets the change.
[Parameter]
public EventCallback<bool> Change { get; set; }
Property Value
- EventCallback<bool>
The change.
CurrentPlaceholder
Gets the current placeholder. Returns empty string if this component is inside a RadzenFormField.
protected string CurrentPlaceholder { get; }
Property Value
EditContext
Gets or sets the edit context.
[CascadingParameter]
public EditContext EditContext { get; set; }
Property Value
- EditContext
The edit context.
FieldIdentifier
Gets the field identifier.
public FieldIdentifier FieldIdentifier { get; }
Property Value
- FieldIdentifier
The field identifier.
Form
Gets or sets the form.
[CascadingParameter]
public IRadzenForm Form { get; set; }
Property Value
- IRadzenForm
The form.
FormFieldContext
Provides support for RadzenFormField integration.
[CascadingParameter]
public IFormFieldContext FormFieldContext { get; set; }
Property Value
HasValue
Gets a value indicating whether this instance has value.
public virtual bool HasValue { get; }
Property Value
- bool
true
if this instance has value; otherwise,false
.
InputAttributes
Specifies additional custom attributes that will be rendered by the input.
[Parameter]
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
- IReadOnlyDictionary<string, object>
The attributes.
IsBound
Gets a value indicating whether this instance is bound.
public bool IsBound { get; }
Property Value
- bool
true
if this instance is bound; otherwise,false
.
Name
Gets or sets the name.
[Parameter]
public string Name { get; set; }
Property Value
- string
The name.
Placeholder
Gets or sets the placeholder.
[Parameter]
public string Placeholder { get; set; }
Property Value
- string
The placeholder.
ToggleButtonStyle
Gets or sets the ToggleButton style.
[Parameter]
public ButtonStyle ToggleButtonStyle { get; set; }
Property Value
- ButtonStyle
The ToggleButton style.
ToggleIcon
Gets or sets the toggle icon.
[Parameter]
public string ToggleIcon { get; set; }
Property Value
- string
The toggle icon.
ToggleShade
Gets or sets the ToggleButton shade.
[Parameter]
public Shade ToggleShade { get; set; }
Property Value
- Shade
The ToggleButton shade.
Value
Gets or sets the value.
[Parameter]
public virtual bool Value { get; set; }
Property Value
- bool
The value.
ValueChanged
Gets or sets the value changed.
[Parameter]
public EventCallback<bool> ValueChanged { get; set; }
Property Value
- EventCallback<bool>
The value changed.
ValueExpression
Gets or sets the value expression.
[Parameter]
public Expression<Func<bool>> ValueExpression { get; set; }
Property Value
- Expression<Func<bool>>
The value expression.
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
Dispose()
Disposes this instance.
public override void Dispose()
FocusAsync()
public virtual ValueTask FocusAsync()
Returns
GetClassList(string)
Gets the class list.
protected ClassList GetClassList(string className)
Parameters
className
stringName of the class.
Returns
- ClassList
ClassList.
GetComponentCssClass()
protected override string GetComponentCssClass()
Returns
GetValue()
Gets the value.
public object GetValue()
Returns
- object
System.Object.
OnClick(MouseEventArgs)
public override Task OnClick(MouseEventArgs args)
Parameters
args
MouseEventArgs
Returns
OnContextMenu(MouseEventArgs)
Handles the ContextMenu event.
public override Task OnContextMenu(MouseEventArgs args)
Parameters
args
MouseEventArgsThe MouseEventArgs instance containing the event data.
Returns
- Task
Task.
SetParametersAsync(ParameterView)
Sets the parameters asynchronous.
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
ParameterViewThe parameters.
Returns
- Task
Task.