Class BOBInputCheckbox<TValue>
- Namespace
- BlazOrbit.Components.Forms
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBInputCheckbox<TValue> : BOBInputComponentBase<TValue, BOBInputCheckbox<TValue>, BOBInputCheckboxVariant>, IHasReadOnly, IHasDisabled, IHasRequired, IHasError, IVariantComponent<BOBInputCheckboxVariant>, IVariantComponent, IHasSize, IHasColor, IHasDensity
Type Parameters
TValue
- Inheritance
-
objectComponentBaseInputBase<TValue>BOBInputComponentBase<TValue>BOBInputCheckbox<TValue>
- Implements
- Inherited Members
Constructors
BOBInputCheckbox()
public BOBInputCheckbox()
Properties
BuiltInTemplates
protected override IReadOnlyDictionary<BOBInputCheckboxVariant, Func<BOBInputCheckbox<TValue>, RenderFragment>> BuiltInTemplates { get; }
Property Value
- IReadOnlyDictionary<BOBInputCheckboxVariant, Func<BOBInputCheckbox<TValue>, RenderFragment>>
CheckedIcon
Material icon name for the Checked.
[Parameter]
public IconKey? CheckedIcon { get; set; }
Property Value
Color
Text or foreground color. Accepts any valid CSS color value.
[Parameter]
public string? Color { get; set; }
Property Value
- string
DefaultVariant
Default variant used when no explicit variant is specified.
public override BOBInputCheckboxVariant DefaultVariant { get; }
Property Value
Density
Vertical density (gap) of the component.
[Parameter]
public BOBDensity Density { get; set; }
Property Value
HelperText
Helper text displayed below the component for additional context.
[Parameter]
public string? HelperText { get; set; }
Property Value
- string
IndeterminateIcon
Material icon name for the Indeterminate.
[Parameter]
public IconKey? IndeterminateIcon { get; set; }
Property Value
Label
Floating label displayed above the component.
[Parameter]
public string? Label { get; set; }
Property Value
- string
Size
Visual size of the component.
[Parameter]
public BOBSize Size { get; set; }
Property Value
UncheckedIcon
Material icon name for the Unchecked.
[Parameter]
public IconKey? UncheckedIcon { get; set; }
Property Value
Methods
BuildComponentDataAttributes(Dictionary<string, object>)
public override void BuildComponentDataAttributes(Dictionary<string, object> dataAttributes)
Parameters
dataAttributesDictionary<string, object>
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder
OnInitialized()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
protected override void OnInitialized()
TryParseValueFromString(string?, out TValue, out string)
Parses a string to create an instance of TValue. Derived classes can override this to change how
Microsoft.AspNetCore.Components.Forms.InputBase<TValue>.CurrentValueAsString interprets incoming values.
protected override bool TryParseValueFromString(string? value, out TValue result, out string validationErrorMessage)
Parameters
valuestringThe string value to be parsed.
resultTValueAn instance of
TValue.validationErrorMessagestringIf the value could not be parsed, provides a validation error message.
Returns
- bool
True if the value could be parsed; otherwise false.