MudTreeView<T> API

Pages
Properties
Name Type Default Description
Data
ChildContent
RenderFragment
null Child content of component.
Items
HashSet<T>
ItemTemplate
RenderFragment<T>
null ItemTemplate for rendering children.
ServerData
Func<T, Task<HashSet<T>>>
null
Behavior
Disabled
bool
False If true, treeview will be disabled and all its childitems.
Selecting
CheckBoxColor
Color
Color.Default Check box color if multiselection is used.
Color
Color
Color.Primary The color of the selected treeviewitem.
Comparer
IEqualityComparer<T>
Comparer is used to check if two tree items are equal
MultiSelection
bool
False if true, multiple values can be selected via checkboxes which are automatically shown in the tree view.
SelectedValue
T
null
Click action
ExpandOnClick
bool
False If true, clicking anywhere on the item will expand it, if it has children.
ExpandOnDoubleClick
bool
False If true, double-clicking anywhere on the item will expand it, if it has children.
Appearance
Dense
bool
False If true, compact vertical padding will be applied to all treeview items.
Height
string
null Setting a height will allow to scroll the treeview. If not set, it will try to grow in height. You can set this to any CSS value that the attribute 'height' accepts, i.e. 500px.
Hover
bool
False Hover effect for item's on mouse-over.
MaxHeight
string
null Setting a maximum height will allow to scroll the treeview. If not set, it will try to grow in height. You can set this to any CSS value that the attribute 'height' accepts, i.e. 500px.
Width
string
null Setting a width the treeview. You can set this to any CSS value that the attribute 'height' accepts, i.e. 500px.
Common
Class
string
null User class names, separated by space.
Style
string
null User styles, applied on top of the component's own classes and styles.
Tag
object
null Use Tag to attach any user data object to the component for your convenience.
UserAttributes
Dictionary<string, object>
UserAttributes carries all attributes you add to the component that don't match any of its parameters. They will be splatted onto the underlying HTML tag.
EventCallbacks
Name Type Description
SelectedValueChanged EventCallback<T> Called whenever the selected value changed.
SelectedValuesChanged EventCallback<HashSet<T>> Called whenever the selectedvalues changed.
Methods
Name Parameters Return Description
Task Select(MudTreeViewItem<T> item, bool isSelected)
MudTreeViewItem<T> item
bool isSelected
Task

Copyright © 2020-2024 MudBlazor.

Powered by .NET 8.0.8

    An error has occurred. This application may no longer respond until reloaded. Reload 🗙