0

What logic does HierarchicalDataTemplate use to create a new branch? By this I mean "what available properties of the items in the ItemsSource does HierarchicalDataTemplate use to know it needs to make a new branch."

--UPDATE-- I was being caught off guard because I had seen a lot of posts showing how Hier.DataTemplate will make new branches when a property of a specified DataType was available. I knew that this must be able to be done with self-referencing tables where all the items are of the same DataType, but couldn't find any answered questions regarding this.

The TreeView bindings can't just have the correct path to drill down--I didn't have enough recursion defined in the family of my ObservableCollection to understand that Hier.DataTemplate just needs to be given a property to look down through to see children.

Thanks!

Rachael
  • 1,965
  • 4
  • 29
  • 55
  • 1
    Get reflector and inspect `PresentationFramework.dll` if you care about how it works internally. – Federico Berasategui Apr 24 '13 at 01:31
  • I would really like to hear it in human English...Hearing someone else's understanding may help me where looking through code doesn't here. But I will definitely do that too :) Thank you. – Rachael Apr 24 '13 at 01:51
  • Is there any free version of Reflector? Thanks again. – Rachael Apr 24 '13 at 01:51
  • 1
    I don't know dude, your question is too vague. What logic does it use to create a new brach? well it just creates one for each item in the ItemsSource collection. – Federico Berasategui Apr 24 '13 at 02:05
  • 1
    @UB3571, not exactly Reflector, but there is [ILSpy](http://ilspy.net/) – icebat Apr 24 '13 at 14:21
  • Thanks guys. I updated the question. How do I close it, since now I realize I was looking for answers unnecessarily deep? or do i just delete it? – Rachael Apr 24 '13 at 14:48

0 Answers0