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, IPureBuiltComponent, IBuiltComponent, IHasSize, IHasColor, IHasDensity, IHasActive
Type Parameters
TValue
- Inheritance
-
objectComponentBaseInputBase<TValue>BOBInputComponentBase<TValue>BOBInputCheckbox<TValue>
- Implements
- Inherited Members
Constructors
BOBInputCheckbox()
public BOBInputCheckbox()
Properties
Active
When true, forces the active state.
[Parameter]
public bool Active { get; set; }
Property Value
- bool
BuiltInTemplates
Compile-time map of variants to their built-in render templates.
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, PaletteColor or BOBColor.
[Parameter]
public string? Color { get; set; }
Property Value
- string
DefaultVariant
Variant used when no Variant is supplied.
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
IsActive
Computed active state.
public bool IsActive { get; }
Property Value
- bool
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
BuildComponentCssVariables(Dictionary<string, string>)
Contributes additional CSS custom properties to the inline style attribute. Keys
that collide with framework-owned --bob-inline-* variables will be overwritten.
public void BuildComponentCssVariables(Dictionary<string, string> cssVariables)
Parameters
cssVariablesDictionary<string, string>
BuildComponentDataAttributes(Dictionary<string, object>)
Contributes additional data- attributes to the root element. Keys that collide
with framework-owned data-bob- attributes will be overwritten.
public 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.