Method AddChild
AddChild(TreeViewItem?, TreeViewItem, bool)
Adds a child item to the specified parent item in the tree view.
public virtual bool AddChild(TreeViewItem? parentItem, TreeViewItem childItem, bool selectItem = false)
Parameters
parentItemTreeViewItemThe parent item to which the child item will be added. If null, the child item will be added to the root item.
childItemTreeViewItemThe child item to add.
selectItemboolIf true, the child item will be selected after being added.
Returns
- bool
true if the child item was successfully added; otherwise, false.