Class BaseTreeViewExtensions
Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll
Provides extension methods for BaseTreeView.
public static class BaseTreeViewExtensions
Inheritance
object ← BaseTreeViewExtensions
Methods
AddItemExpandedChanged<T>(T, Action<TreeViewExpansionChangedArgs>)
Subscribes to the itemExpandedChanged event.
public static T AddItemExpandedChanged<T>(this T element, Action<TreeViewExpansionChangedArgs> value) where T : BaseTreeView
Parameters
element T
The element to modify.
value Action<TreeViewExpansionChangedArgs>
The callback to subscribe.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
RemoveItemExpandedChanged<T>(T, Action<TreeViewExpansionChangedArgs>)
Unsubscribes from the itemExpandedChanged event.
public static T RemoveItemExpandedChanged<T>(this T element, Action<TreeViewExpansionChangedArgs> value) where T : BaseTreeView
Parameters
element T
The element to modify.
value Action<TreeViewExpansionChangedArgs>
The callback to remove.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetAutoExpand<T>(T, bool)
Sets autoExpand.
public static T SetAutoExpand<T>(this T element, bool value) where T : BaseTreeView
Parameters
element T
The element to modify.
value bool
When true, items are expanded automatically.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetRootItemsSelf<T, TData>(T, IList<TreeViewItemData<TData>>)
Sets the root items of the tree via SetRootItems<T>.
public static T SetRootItemsSelf<T, TData>(this T element, IList<TreeViewItemData<TData>> value) where T : BaseTreeView
Parameters
element T
The element to modify.
value IList<TreeViewItemData<TData>>
The root items, each with its children; null clears the tree.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
TData
The type of the data stored in each tree item.