Class MudToggleItem<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
public class MudToggleItem<T> : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IDisposable
Type Parameters
T
- Inheritance
-
MudToggleItem<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
MudToggleItem()
public MudToggleItem()
Properties
CheckMarkClassname
protected string CheckMarkClassname { get; }
Property Value
ChildContent
Custom child content which overrides the text. The boolean parameter conveys whether or not the item is selected.
[Parameter]
[Category("Appearance")]
public RenderFragment<bool>? ChildContent { get; set; }
Property Value
Classname
protected string Classname { get; }
Property Value
Disabled
If true, the item will be disabled.
[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }
Property Value
Parent
[CascadingParameter]
public MudToggleGroup<T>? Parent { get; set; }
Property Value
Selected
protected bool Selected { get; }
Property Value
SelectedIcon
Icon to show if the item is selected (if CheckMark is true on the parent group) By default this is set to a check mark icon.
[Parameter]
[Category("Appearance")]
public string? SelectedIcon { get; set; }
Property Value
Text
The text to show. You need to set this only if you want a text that differs from the Value. If null, show Value?.ToString(). Note: the Text is only shown if you haven't defined your own child content.
[Parameter]
[Category("Appearance")]
public string? Text { get; set; }
Property Value
UnselectedIcon
Icon to show if the item is not selected (if CheckMark is true on the parent group) Leave null to show no check mark (default).
[Parameter]
[Category("Appearance")]
public string? UnselectedIcon { get; set; }
Property Value
Value
[Parameter]
[Category("Behavior")]
public T? Value { get; set; }
Property Value
- T
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
Dispose()
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
HandleOnClickAsync()
protected Task HandleOnClickAsync()
Returns
OnInitialized()
protected override void OnInitialized()
SetSelected(bool)
public void SetSelected(bool selected)
Parameters
selected
bool