Class MBList<TItem>
This is a general purpose Material Theme list implementing one and two line MB web component standards. It also implements a Material.Blazor interpretation of the specification for a three line list item.
Implements
Inherited Members
Namespace: Material.Blazor
Assembly: Material.Blazor.dll
Syntax
public class MBList<TItem> : ComponentFoundation, IDisposable
Type Parameters
Name | Description |
---|---|
TItem |
Properties
| Improve this Doc View SourceGetKeysFunc
A function delegate to return the parameters for @key
attributes. If unused
"fake" keys set to GUIDs will be used.
Declaration
public Func<TItem, object> GetKeysFunc { get; set; }
Property Value
Type | Description |
---|---|
Func<TItem, Object> |
HideLineThree
Hides "line three" if True. Defaults to False.
Declaration
public bool HideLineThree { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
HideLineTwo
Hides "line two" if True. Defaults to False.
Declaration
public bool HideLineTwo { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Icon
The icon render fragment to use if !SuppressIcons
.
Note that you will be expected to render your own icon, and can use MBIcon.
Declaration
public RenderFragment<TItem> Icon { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<TItem> |
Items
The items to display in the list.
Declaration
public IEnumerable<TItem> Items { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<TItem> |
KeyboardInteractions
Allows keyboard interactions if True. Defaults to False.
Declaration
public bool KeyboardInteractions { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
LineThree
The "line three" render fragment.
Declaration
public RenderFragment<TItem> LineThree { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<TItem> |
LineTwo
The "line two" render fragment.
Declaration
public RenderFragment<TItem> LineTwo { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<TItem> |
ListStyle
The list style.
Overrides ListStyle
Declaration
public MBListStyle? ListStyle { get; set; }
Property Value
Type | Description |
---|---|
Nullable<MBListStyle> |
ListType
The list type.
Overrides ListType
Declaration
public MBListType? ListType { get; set; }
Property Value
Type | Description |
---|---|
Nullable<MBListType> |
NonInteractive
Sets the non interative Material Theme class if True. Defaults to False.
Declaration
public bool NonInteractive { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
OnClick
An @onclick event handler returning the index of the relevant list item.
Declaration
public EventCallback<int> OnClick { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<Int32> |
OnKeyDown
An @onkeydown event handler returning the index of the relevant list item.
Declaration
public EventCallback<int> OnKeyDown { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<Int32> |
OnMouseDown
An @onmousedown event handler returning the index of the relevant list item.
Declaration
public EventCallback<int> OnMouseDown { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<Int32> |
OnTouchStart
An @ontouchstart event handler returning the index of the relevant list item.
Declaration
public EventCallback<int> OnTouchStart { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<Int32> |
PrimaryActions
The primary actions render fragment.
Declaration
public RenderFragment<TItem> PrimaryActions { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<TItem> |
Ripple
Applies ripple to the list item if True. Defaults to False.
Declaration
public bool Ripple { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
SecondaryActions
The secondary actions render fragment.
Declaration
public RenderFragment<TItem> SecondaryActions { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<TItem> |
ShowSeparators
Shows a MBListDivider between list items if True. Defaults to False.
Declaration
public bool ShowSeparators { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
SingleLineDensity
Declaration
public MBDensity? SingleLineDensity { get; set; }
Property Value
Type | Description |
---|---|
Nullable<MBDensity> |
SuppressIcons
Suppresses icon display if True. Defaults to False.
Declaration
public bool SuppressIcons { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Title
The title line render fragment.
Declaration
public RenderFragment<TItem> Title { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<TItem> |
Methods
| Improve this Doc View SourceOnDisabledSetCallback()
Callback for value the Disabled value setter. MBList is a special case where Material.Blazor re-renders the component when Disabled is set.
Declaration
protected void OnDisabledSetCallback()
OnInitializedAsync()
Declaration
protected override async Task OnInitializedAsync()
Returns
Type | Description |
---|---|
Task |
OnParametersSetAsync()
Declaration
protected override async Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
Task |