Class MudBooleanInput<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Represents a form input component which stores a boolean value.
public class MudBooleanInput<T> : MudFormComponent<T?, bool?>, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IFormComponent, IDisposable
Type Parameters
T
The type of item managed by this component.
- Inheritance
-
MudFormComponent<T, bool?>MudBooleanInput<T>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
MudBooleanInput()
public MudBooleanInput()
Properties
BoolValue
protected bool? BoolValue { get; }
Property Value
- bool?
Disabled
Prevents the user from interacting with this input.
[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }
Property Value
Remarks
Defaults to false
.
ReadOnly
Prevents the user from changing the input.
[Parameter]
[Category("Behavior")]
public bool ReadOnly { get; set; }
Property Value
Remarks
Defaults to false
. When true
, the user can copy the input but cannot change it.
StopClickPropagation
Prevents the parent component from receiving click events.
[Parameter]
[Category("Behavior")]
public bool StopClickPropagation { get; set; }
Property Value
Remarks
Defaults to true
. When true
, the click will not bubble up to parent components.
Value
The currently selected value.
[Parameter]
[Category("Data")]
public T? Value { get; set; }
Property Value
- T
ValueChanged
Occurs when the Value has changed.
[Parameter]
public EventCallback<T?> ValueChanged { get; set; }
Property Value
Methods
GetDisabledState()
protected bool GetDisabledState()
Returns
GetReadOnlyState()
protected bool GetReadOnlyState()
Returns
HasValue(T?)
A value is required, so if not checked we return ERROR.
protected override bool HasValue(T? value)
Parameters
value
T
Returns
OnChange(ChangeEventArgs)
protected virtual Task OnChange(ChangeEventArgs args)
Parameters
args
ChangeEventArgs
Returns
SetBoolValueAsync(bool?, bool?)
protected Task SetBoolValueAsync(bool? value, bool? markAsTouched = null)
Parameters
Returns
SetCheckedAsync(T?)
protected Task SetCheckedAsync(T? value)
Parameters
value
T
Returns
SetConverter(Converter<T?, bool?>)
protected override bool SetConverter(Converter<T?, bool?> value)