Class BOBInputRadio<TValue>
- Namespace
- BlazOrbit.Components.Forms
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBInputRadio<TValue> : BOBInputComponentBase<TValue, BOBInputRadio<TValue>, BOBInputRadioVariant>, IHasReadOnly, IHasDisabled, IHasRequired, IHasError, IVariantComponent<BOBInputRadioVariant>, IVariantComponent, IPureBuiltComponent, IBuiltComponent, IRadioContainer, IHasSize, IHasColor
Type Parameters
TValue
- Inheritance
-
objectComponentBaseInputBase<TValue>BOBInputComponentBase<TValue>BOBInputRadio<TValue>
- Implements
- Inherited Members
Constructors
BOBInputRadio()
public BOBInputRadio()
Properties
BuiltInTemplates
protected override IReadOnlyDictionary<BOBInputRadioVariant, Func<BOBInputRadio<TValue>, RenderFragment>> BuiltInTemplates { get; }
Property Value
- IReadOnlyDictionary<BOBInputRadioVariant, Func<BOBInputRadio<TValue>, RenderFragment>>
CheckedIcon
Material icon name for the Checked.
[Parameter]
public IconKey? CheckedIcon { get; set; }
Property Value
ChildContent
Content rendered inside the component.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
- RenderFragment
ClearText
Text displayed as the Clear.
[Parameter]
public string ClearText { get; set; }
Property Value
- string
Clearable
Clearable.
[Parameter]
public bool Clearable { get; set; }
Property Value
- bool
Color
Text or foreground color. Accepts any valid CSS color value, PaletteColor or BOBColor.
[Parameter]
public string? Color { get; set; }
Property Value
- string
DefaultVariant
Default variant used when no explicit variant is specified.
public override BOBInputRadioVariant DefaultVariant { get; }
Property Value
HelperText
Helper text displayed below the component for additional context.
[Parameter]
public string? HelperText { get; set; }
Property Value
- string
Label
Floating label displayed above the component.
[Parameter]
public string? Label { get; set; }
Property Value
- string
Orientation
Orientation.
[Parameter]
public RadioOrientation Orientation { get; set; }
Property Value
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.