private void Expand() { if (Type == DirectoryItemType.File) { return; } Children = new ObservableCollection <DirectoryItemViewModel> (DirectoryStructure.GetDirectoryContent(FullPath).Select(c => new DirectoryItemViewModel(c.FullPath, c.Type))); }
public DirectoryStructureViewModel() { var drives = DirectoryStructure.GetLogicalDrives(); Items = new ObservableCollection <DirectoryItemViewModel>(drives.Select(d => new DirectoryItemViewModel(d.FullPath, d.Type))); }