[β οΈ JOURNEY] Building MP3 AI Manager for Music Hoarders (Day 14)
Viet Phan 0Jan 4, 2025 1 min read
Day 14
Hours worked/Total: 0.5/22
Day Recap
Connected the folder picker functionality to a Avalonia ListBox to render filenames from the selected folder. Resolved issues with path transformations and successfully displayed file lists dynamically.
What I Did
- Decided to use the folder path from the picker to populate a ListBox with filenames.
- Tested the ObservableObject type for MainWindowViewModel:
- Verified that [RelayCommand] works with this setup and generates boilerplate code for commands.
- Reused the folder path variable but encountered an issue:
- The folder picker returns a universal URI syntax.
- Directory.GetFiles requires a traditional file path, so I had to transform the URI syntax accordingly.
- Implemented dynamic rendering:
- When the user picks a folder, the app retrieves the filenames and displays them in a ListBox.
Remarks
- Finally seeing the app handle dynamic data feels rewarding. The integration of ObservableObject with [RelayCommand] significantly simplifies the process.
- The ListBox rendering works well, and the app feels more interactive now.
Next Goals
Learn how to design a sidebar with Avalonia axaml layout system.
π¨βπ» Software Developmentπ Journey