Recently I got to know about Eto, I think you're doing a wonderful work with it.
So, to introduce myself to it, I started to create an application. I have almost everything finished minus a little problem I came across recently: I need to create a TreeView and populate it with the system's folder names, but I don't know how.
So far I managed to create the TreeView, but I can't seem to be able to populate it with the right data, or any data at all.
Based on the DataGridView example you have on gitHub, here's the code I have:
treeIzq = new TreeView();
var rootDirectoryInfo = new DirectoryInfo(path);
var directorios = new ObservableCollection<PathTreeNode>();
treeIzq.DataStore = directorios;
As it is, it won't build and shows an error saying that it can't convert PathTreeNode to ITreeStore, that I should use a cast.
When I use the cast
treeIzq.DataStore = (ITreeStore)directorios;
it builds fine but throws an exception when it starts to run saying that it can't make the conversion to ITreeStore.
PathTreeNode is a custom class I implemented, it inherits from TreeItem and has two properties: a path to a file, and the filename.
I tried searching for any example of this, but I got nothing, and every idea I had failed, so right now I don't know what to make of it.
Could you help me? How can I populate the TreeView?
Thanks in advance,