views:

26

answers:

1

I have a service that retrieve only one node that has subNodes. I want to bind this node to the treeview by HierarchicalDataTemplate The problem is that itemsSource require a collection.

Can I Somehow Bind the treeView to this node without wrapping it with a collection?

A: 

You can do it programattically by just setting the root node object. The hierarchial data template may allow but you would just specify an empty list as the sublist... if you are wanting items in this list to actually show later you would have to write some kind of custom logic to rebind this source when items were actually available.

Jeff Gwaltney