Class RadzenToggleButton
RadzenButton component.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenToggleButton : RadzenButton, IDisposable, IRadzenFormComponent
Examples
<RadzenToggleButton Click=@(args => Console.WriteLine("Button clicked")) Text="ToggleButton" />
Fields
_value
The value
Declaration
protected bool _value
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
Change
Gets or sets the change.
Declaration
public EventCallback<bool> Change { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Boolean> | The change. |
CurrentPlaceholder
Gets the current placeholder. Returns empty string if this component is inside a RadzenFormField.
Declaration
protected string CurrentPlaceholder { get; }
Property Value
Type | Description |
---|---|
System.String |
EditContext
Gets or sets the edit context.
Declaration
public EditContext EditContext { get; set; }
Property Value
Type | Description |
---|---|
EditContext | The edit context. |
FieldIdentifier
Gets the field identifier.
Declaration
public FieldIdentifier FieldIdentifier { get; }
Property Value
Type | Description |
---|---|
FieldIdentifier | The field identifier. |
Form
Gets or sets the form.
Declaration
public IRadzenForm Form { get; set; }
Property Value
Type | Description |
---|---|
IRadzenForm | The form. |
FormFieldContext
Provides support for RadzenFormField integration.
Declaration
public IFormFieldContext FormFieldContext { get; set; }
Property Value
Type | Description |
---|---|
IFormFieldContext |
HasValue
Gets a value indicating whether this instance has value.
Declaration
public virtual bool HasValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
InputAttributes
Specifies additional custom attributes that will be rendered by the input.
Declaration
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<System.String, System.Object> | The attributes. |
IsBound
Gets a value indicating whether this instance is bound.
Declaration
public bool IsBound { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Name
Gets or sets the name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Placeholder
Gets or sets the placeholder.
Declaration
public string Placeholder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The placeholder. |
ToggleButtonStyle
Gets or sets the ToggleButton style.
Declaration
public ButtonStyle ToggleButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
ButtonStyle | The ToggleButton style. |
ToggleIcon
Gets or sets the toggle icon.
Declaration
public string ToggleIcon { get; set; }
Property Value
Type | Description |
---|---|
System.String | The toggle icon. |
ToggleShade
Gets or sets the ToggleButton shade.
Declaration
public Shade ToggleShade { get; set; }
Property Value
Type | Description |
---|---|
Shade | The ToggleButton shade. |
Value
Gets or sets the value.
Declaration
public virtual bool Value { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The value. |
ValueChanged
Gets or sets the value changed.
Declaration
public EventCallback<bool> ValueChanged { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Boolean> | The value changed. |
ValueExpression
Gets or sets the value expression.
Declaration
public Expression<Func<bool>> ValueExpression { get; set; }
Property Value
Type | Description |
---|---|
Expression<Func<System.Boolean>> | The value expression. |
Methods
Dispose()
Disposes this instance.
Declaration
public override void Dispose()
Overrides
FocusAsync()
Sets the focus.
Declaration
public virtual async ValueTask FocusAsync()
Returns
Type | Description |
---|---|
ValueTask |
GetClassList(String)
Gets the class list.
Declaration
protected ClassList GetClassList(string className)
Parameters
Type | Name | Description |
---|---|---|
System.String | className | Name of the class. |
Returns
Type | Description |
---|---|
Radzen.Blazor.Rendering.ClassList | ClassList. |
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |
Overrides
GetValue()
Gets the value.
Declaration
public object GetValue()
Returns
Type | Description |
---|---|
System.Object | System.Object. |
OnClick(MouseEventArgs)
Handles the Click event.
Declaration
public override async Task OnClick(MouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | args | The |
Returns
Type | Description |
---|---|
Task |
Overrides
OnContextMenu(MouseEventArgs)
Handles the ContextMenu event.
Declaration
public override Task OnContextMenu(MouseEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
MouseEventArgs | args | The |
Returns
Type | Description |
---|---|
Task | Task. |
SetParametersAsync(ParameterView)
Sets the parameters asynchronous.
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task | Task. |