Table of Contents

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

bool

CheckedChanged

Raised with the new value when a person chooses the item.

[Parameter]
public EventCallback<bool> CheckedChanged { get; set; }

Property Value

EventCallback<bool>

ChildContent

Gets or sets the item's content, in place of Label. Keep it to text.

[Parameter]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

CloseOnClick

Whether choosing the item closes the menu. Defaults to false.

[Parameter]
public bool CloseOnClick { get; set; }

Property Value

bool

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

bool

Label

Gets or sets the item's text. Use ChildContent instead for richer content.

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

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder