private void ClearChildern() { this.Childern = new ObservableCollection <DirectoryItemViewModel>(); if (this.Type != DirectoryItemType.File) { Childern.Add(null); } }
public void AddChild(bool setParent, params TreeNode[] nodes) { foreach (TreeNode node in nodes) { Childern.Add(node, node.Type); if (setParent) { node.Parent = this; } } }
protected virtual void UpdateChildern() { Childern.Clear(); for (int i = 0; i < transform.childCount; i++) { if (transform.GetChild(i).gameObject.activeInHierarchy&& !transform.GetChild(i).gameObject.GetComponent <LayoutSeperatorElement>()) { Childern.Add(transform.GetChild(i)); } } }