Class MBRadioButton<TItem>
This is a general purpose Material Theme radio button. Accepts a generic class TItem and displays as checked if Value equals TargetCheckedValue.
public class MBRadioButton<TItem> : InputComponent<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Type Parameters
TItem
- Inheritance
-
InputComponent<TItem>MBRadioButton<TItem>
- Implements
- Inherited Members
Constructors
MBRadioButton()
public MBRadioButton()
Properties
Density
The radio button's density.
[Parameter]
public MBDensity? Density { get; set; }
Property Value
Label
The radio button label.
[Parameter]
public string Label { get; set; }
Property Value
RadioGroupName
The radio button group name. This is applied to a group of radio buttons so Material Theme can identify them as representing different values of the same property.
[Parameter]
public string RadioGroupName { get; set; }
Property Value
TargetCheckedValue
Value is set to this when the radio button is clicked. If the consumer sets Value to this the radio state will change to checked, or cleared for any other value.
[Parameter]
public TItem TargetCheckedValue { get; set; }
Property Value
- TItem
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
OnInitializedAsync()
protected override Task OnInitializedAsync()
Returns
OnParametersSetAsync()
When overriding this, call await base.OnParametersSetAsync();
before any user code unless there is a very good reason not to.
protected override Task OnParametersSetAsync()