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