Class TreeItemData<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
The current state of a MudTreeViewItem<T>.
public class TreeItemData<T> : IEquatable<TreeItemData<T>>
Type Parameters
T
The type of item to display.
- Inheritance
-
TreeItemData<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
TreeItemData()
public TreeItemData()
TreeItemData(T?)
protected TreeItemData(T? value)
Parameters
value
T
Properties
Children
The child items underneath this item.
public virtual List<TreeItemData<T>>? Children { get; set; }
Property Value
- List<TreeItemData<T>>
Expandable
Whether this item can be expanded.
public virtual bool Expandable { get; set; }
Property Value
Remarks
Defaults to true
.
Expanded
Whether this item is expanded.
public virtual bool Expanded { get; set; }
Property Value
Remarks
Defaults to false
.
HasChildren
Whether this item contains child items.
public virtual bool HasChildren { get; }
Property Value
Icon
The icon for this item.
public virtual string? Icon { get; set; }
Property Value
Remarks
Defaults to null
.
Selected
Whether this item is selected.
public virtual bool Selected { get; set; }
Property Value
Remarks
Defaults to false
.
Text
The text of this item.
public virtual string? Text { get; set; }
Property Value
Remarks
Defaults to null
.
Value
The value associated with this item.
public T? Value { get; init; }
Property Value
- T
Remarks
Defaults to null
.
Visible
Whether this item is displayed.
public virtual bool Visible { get; set; }
Property Value
Remarks
Defaults to true
.
Methods
Equals(TreeItemData<T>?)
Whether this item is the same as the specified item.
public virtual bool Equals(TreeItemData<T>? other)
Parameters
other
TreeItemData<T>The item to compare.
Returns
- bool
When
true
, the items are equivalent.
Equals(object?)
Whether this item is the same as the specified item.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare.
Returns
- bool
When
true
, the items are equivalent.
GetHashCode()
The unique hash code for this item.
public override int GetHashCode()