Ejemplo n.º 1
0
        private void OnVmExpanded(object sender, EventArgs e)
        {
            ITreeItem parent = (ITreeItem)sender;

            Console.WriteLine($"OnVmExpanded: {parent.Path} expanded");
            List <ITreeItem> children = GetDescendants(parent);

            if (children.Count > 0)
            {
                RemoveNodes(children);
                parent.RemoveAllChildren();
            }
            CreateSubFolders(parent);
            //Create children for parent's children
            foreach (ITreeItem item in parent.Children)
            {
                CreateSubFolders(item);
            }
        }