Table of Contents

Class BOBInputSwitch

Namespace
BlazOrbit.Components.Forms
Assembly
BlazOrbit.dll
[GenerateComponentInfo]
public class BOBInputSwitch : BOBInputComponentBase<bool, BOBInputSwitch, BOBInputSwitchVariant>, IHasReadOnly, IHasDisabled, IHasRequired, IHasError, IVariantComponent<BOBInputSwitchVariant>, IVariantComponent, IHasSize, IHasDensity
Inheritance
object
ComponentBase
InputBase<bool>
BOBInputSwitch
Implements
Inherited Members

Constructors

BOBInputSwitch()

public BOBInputSwitch()

Properties

BuiltInTemplates

protected override IReadOnlyDictionary<BOBInputSwitchVariant, Func<BOBInputSwitch, RenderFragment>> BuiltInTemplates { get; }

Property Value

IReadOnlyDictionary<BOBInputSwitchVariant, Func<BOBInputSwitch, RenderFragment>>

DefaultVariant

Default variant used when no explicit variant is specified.

public override BOBInputSwitchVariant DefaultVariant { get; }

Property Value

BOBInputSwitchVariant

Density

Vertical density (gap) of the component.

[Parameter]
public BOBDensity Density { get; set; }

Property Value

BOBDensity

HelperText

Helper text displayed below the component for additional context.

[Parameter]
public string? HelperText { get; set; }

Property Value

string

IconActive

IconActive.

[Parameter]
public IconKey? IconActive { get; set; }

Property Value

IconKey?

IconInactive

IconInactive.

[Parameter]
public IconKey? IconInactive { get; set; }

Property Value

IconKey?

IsChecked

protected bool IsChecked { 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

BOBSize

TrackColorActive

TrackColorActive.

[Parameter]
public string? TrackColorActive { get; set; }

Property Value

string

TrackColorInactive

TrackColorInactive.

[Parameter]
public string? TrackColorInactive { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

TryParseValueFromString(string?, out bool, out string)

Parses a string to create an instance of bool. 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 bool result, out string validationErrorMessage)

Parameters

value string

The string value to be parsed.

result bool

An instance of bool.

validationErrorMessage string

If the value could not be parsed, provides a validation error message.

Returns

bool

True if the value could be parsed; otherwise false.