Ejemplo n.º 1
0
        private void Rectangle_Drop(object sender, DragEventArgs e)
        {
            var data     = (DirectoryItem)(e.Data.GetData(typeof(DirectoryItem)));
            var dataView = new DirectoryItemViewModel(data.FullPath, data.Type);

            list.Add(dataView);
        }
        public List <string> GetExpandedItems(DirectoryItemViewModel item, List <string> result)
        {
            var list = item.Children.Where(i => i.CanExpand && i.IsExpanded).ToList();

            result.AddRange(list.Select(i => i.FullPath).ToList());
            foreach (var i in list)
            {
                GetExpandedItems(i, result);
            }
            return(result);
        }