Class TwMenuCheckboxItem
- Namespace
- TwBlazor.Components
- Assembly
- TwBlazor.dll
An option in a TwMenu that is on or off, such as whether a column is shown. Choosing it flips Checked, and by default leaves the menu open so several options can be changed in a row.
public class TwMenuCheckboxItem : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
- Inheritance
-
TwMenuCheckboxItem
- Implements
- Inherited Members
Constructors
TwMenuCheckboxItem()
public TwMenuCheckboxItem()
Properties
Checked
Gets or sets whether the option is on. Bind it with @bind-Checked.
[Parameter]
public bool Checked { get; set; }
Property Value
CheckedChanged
Raised with the new value when a person chooses the item.
[Parameter]
public EventCallback<bool> CheckedChanged { get; set; }
Property Value
ChildContent
Gets or sets the item's content, in place of Label. Keep it to text.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Property Value
CloseOnClick
Whether choosing the item closes the menu. Defaults to false.
[Parameter]
public bool CloseOnClick { get; set; }
Property Value
Disabled
Whether the item is disabled. It is skipped by the arrow keys and cannot be changed.
[Parameter]
public bool Disabled { get; set; }
Property Value
Label
Gets or sets the item's text. Use ChildContent instead for richer content.
[Parameter]
public string? Label { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder