Class MudList<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
[CascadingTypeParameter("T")]
public class MudList<T> : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IDisposable
Type Parameters
T
- Inheritance
-
MudList<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
MudList()
public MudList()
Properties
CheckBoxColor
Check box color if multiselection is used.
[Parameter]
[Category("Selecting")]
public Color CheckBoxColor { get; set; }
Property Value
CheckedIcon
Custom checked icon.
[Parameter]
[Category("Selecting")]
public string CheckedIcon { get; set; }
Property Value
ChildContent
Child content of component.
[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }
Property Value
Classname
protected string Classname { get; }
Property Value
Color
The color of the selected List Item.
[Parameter]
[Category("Appearance")]
public Color Color { get; set; }
Property Value
Comparer
Comparer is used to check if two tree items are equal
[Parameter]
[Category("Selecting")]
public IEqualityComparer<T?> Comparer { get; set; }
Property Value
Dense
If true, list items will take up less vertical space.
[Parameter]
[Category("Appearance")]
public bool Dense { get; set; }
Property Value
Disabled
If true, will disable the list item if it has onclick.
[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }
Property Value
Gutters
If true, left and right padding is added to all list items. Default is true.
[Parameter]
[Category("Appearance")]
public bool Gutters { get; set; }
Property Value
Padding
If true, vertical padding will be applied to the list.
[Parameter]
[Category("Appearance")]
public bool Padding { get; set; }
Property Value
ParentList
[CascadingParameter]
protected MudList<T>? ParentList { get; set; }
Property Value
- MudList<T>
ReadOnly
If true, the list items will not be clickable and the selected item can not be changed by the user.
[Parameter]
[Category("Selecting")]
public bool ReadOnly { get; set; }
Property Value
SelectedValue
The current selected value.
[Parameter]
[Category("Selecting")]
public T? SelectedValue { get; set; }
Property Value
- T
SelectedValueChanged
Called whenever the selection changed
[Parameter]
public EventCallback<T?> SelectedValueChanged { get; set; }
Property Value
SelectedValues
The current selected value.
[Parameter]
[Category("Selecting")]
public IReadOnlyCollection<T>? SelectedValues { get; set; }
Property Value
SelectedValuesChanged
Called whenever the selection changed
[Parameter]
public EventCallback<IReadOnlyCollection<T>?> SelectedValuesChanged { get; set; }
Property Value
SelectionMode
The selection mode determines whether only a single item (SingleSelection or ToggleSelection) or multiple items can be selected (MultiSelection). The difference between SingleSelection and ToggleSelection is whether the selected item can be toggled off by clicking a second time.
[Parameter]
[Category("Selecting")]
public SelectionMode SelectionMode { get; set; }
Property Value
UncheckedIcon
Custom unchecked icon.
[Parameter]
[Category("Selecting")]
public string UncheckedIcon { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
Dispose()
public void Dispose()
OnAfterRender(bool)
protected override void OnAfterRender(bool firstRender)
Parameters
firstRender
bool
OnInitialized()
protected override void OnInitialized()