Пример #1
0
 private void Expand()
 {
     if (DirectoryItemType.File == this.Type)
     {
         return;
     }
     Childern = new ObservableCollection <DirectoryItemViewModel>(DirectoryStructrue.GetDirectoryContents(FullPath).Select(content => new DirectoryItemViewModel(FullPath = content.FullPath, Type = content.Type)));
 }
        public DirectoryStructureViewModel()
        {
            var childerns = DirectoryStructrue.GetLogicalDrivers();

            Items = new ObservableCollection <DirectoryItemViewModel>(childerns.Select(childern => new DirectoryItemViewModel(childern.FullPath, DirectoryItemType.Driver)));
        }