Table of Contents

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
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

bool

Remarks

Defaults to false.

ReadOnly

Prevents the user from changing the input.

[Parameter]
[Category("Behavior")]
public bool ReadOnly { get; set; }

Property Value

bool

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

bool

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

EventCallback<T>

Methods

GetDisabledState()

protected bool GetDisabledState()

Returns

bool

GetReadOnlyState()

protected bool GetReadOnlyState()

Returns

bool

HasValue(T?)

A value is required, so if not checked we return ERROR.

protected override bool HasValue(T? value)

Parameters

value T

Returns

bool

OnChange(ChangeEventArgs)

protected virtual Task OnChange(ChangeEventArgs args)

Parameters

args ChangeEventArgs

Returns

Task

SetBoolValueAsync(bool?, bool?)

protected Task SetBoolValueAsync(bool? value, bool? markAsTouched = null)

Parameters

value bool?
markAsTouched bool?

Returns

Task

SetCheckedAsync(T?)

protected Task SetCheckedAsync(T? value)

Parameters

value T

Returns

Task

SetConverter(Converter<T?, bool?>)

protected override bool SetConverter(Converter<T?, bool?> value)

Parameters

value Converter<T, bool?>

Returns

bool