/// <summary> /// Expands the directory and finds all the children /// </summary> private void Expand() { if (Type == DirectotyItemType.File) { return; } // Find all children var children = DirectoryStructure.GetirectoryContents(this.FullPath); this.Children = new ObservableCollection <DirectoryItemViewModel>( children.Select(content => new DirectoryItemViewModel(content.FullPath, content.Type))); }