Hi everybody,
I have a question about TreeView. In my application, I have two types of objects : "Folder" and "Server".
I have a list of folders (ObservableCollection<Folder> Childs). Each folder can contain an other list of subfolders (ObservableCollection<Folder> Childs) that can contain a list of servers (ObservableCollection<Server>).
-Folder
--Folder
---Server
---Server
-Folder
--Folder
---Server
I would like to have the root list of folders as ItemsSource of a TreeView and show its subfolders and the servers in each subfolder. What is the best way to do that ? I read many things about DataTemplateSelector but I don't know how to use it. It is a bit complicated...
Thanks in advance for your suggestions.