public DirectoryStructureViewModel() { var children = DirectoryStructure.GetLogicalDrives(); this.Items = new ObservableCollection <DirectoryItemViewModel>( children.Select(drive => new DirectoryItemViewModel(drive.FullPath, DirectoryItemType.Drive))); }
private void Expand() { if (this.Type == DirectoryItemType.File) { return; } var children = DirectoryStructure.GetDirectoryContents(this.FullPath); this.Children = new ObservableCollection <DirectoryItemViewModel>( children.Select(content => new DirectoryItemViewModel(content.FullPath, content.Type))); }