Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to add items to treeview control at runtime?
Posted

1 solution

There are effectively two ways to achieve this in WPF, and they are sometimes known as the wrong way and the right way. I'm not being flippant here, but the TreeView is one of the most abused controls in WPF because people often attempt to manipulate it directly which is messy and complex, rather than populating it using MVVM, which is a lot simpler.

WPF Guru, Josh Smith, posted an excellent tutorial on working with the TreeView using MVVM here[^]. Well worth reading and trying the sample - you will learn how easy it is to use the TreeView using MVVM.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900