Class TwMenuRadioItem<TValue>
- Namespace
- TwBlazor.Components
- Assembly
- TwBlazor.dll
One option of a TwMenuRadioGroup<TValue>. Choosing it makes it the group's value, and by default leaves the menu open, the same as a TwMenuCheckboxItem. Assistive technology announces whether it is the chosen option.
public class TwMenuRadioItem<TValue> : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
Type Parameters
TValueThe type of the option's value, the same as its group's.
- Inheritance
-
TwMenuRadioItem<TValue>
- Implements
- Inherited Members
Constructors
TwMenuRadioItem()
public TwMenuRadioItem()
Properties
ChildContent
Gets or sets the option's content, in place of Label. Keep it to text.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
CloseOnClick
Whether choosing the option closes the menu. Defaults to false.
[Parameter]
public bool CloseOnClick { get; set; }
Property Value
Disabled
Whether the option is disabled. It is skipped by the arrow keys and cannot be chosen.
[Parameter]
public bool Disabled { get; set; }
Property Value
Label
Gets or sets the option's text. Use ChildContent instead for richer content.
[Parameter]
public string? Label { get; set; }
Property Value
Shortcut
Gets or sets a keyboard shortcut shown at the end of the option as a hint. It is only a hint: the app handles the shortcut itself.
[Parameter]
public string? Shortcut { get; set; }
Property Value
Value
Gets or sets the value the group takes when this option is chosen.
[Parameter]
public TValue? Value { get; set; }
Property Value
- TValue
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder