I have a collection of Database objects, each containing collections of Schema objects and User objects. I want to bind them to a TreeView, but adding
You need to fill the properties you're using in your binding with data from your database. Currently you're using a new TreeViewItem
, and using it as a datasource, so what you're saying about it seeing everything as a single node makes sense, as you've placed it in a single node.
You need to load your database data and attach it to the properties you've used in your WPF template as binding items.