I am working on a C# WinForms application and I want to create a file explorer tree view that resembles the Windows File Explorer interface. Specifically, I need to display drives, folders, and files in a hierarchical tree structure, similar to the screenshot attached.
I have tried using the TreeView control in C# WinForms to create a hierarchical structure for displaying drives and folders. I followed some basic tutorials and managed to list the drives, but I’m struggling to dynamically load the folders and files as the user expands the nodes. I expected the tree view to update and show the contents of each folder when expanded, but it doesn’t seem to work as intended. Any guidance on how to properly implement this functionality would be greatly appreciated.