title: How to bind to SelectedItem property of WPF TreeView?
body: <p>I have adapted the TreeView Control sample project <a href="http://www.codeproject.com/Articles/26288/Simplifying-the-WPF-TreeView-by-Using-the-ViewMode" rel="nofollow noreferrer">here</a> for use with Entity Framework objects. It works beautifully, but like many others attempting to update collections or properties on their ParentViewModels based <code>SelectedItem</code> changes, I too am unable to bridge the gap of understanding.</p>
  
  <p>I am working in MVVM, and want my code-behind free of any mess. As a beginner, I like the cleanliness of implementing <code>PropertyChanged</code> notifications  but since their is no inherent "SelectedItem" property to bind to on the <code>TreeView</code>, I am unable to raise my PropertyChanged event as I normally would with <code>ListBox</code>.</p>
  
  <p>I too have a SelectedItem property (that actually successfully captures the object where isSelected = true) on my ChildViewModel (see H.B.'s answer to <a href="https://stackoverflow.com/q/7153813/1751090">this question</a>). I also have a SelectedItem of type ChildViewModel on my ParentViewModel which is bound to my View (see @Martin Liversage's post <a href="https://stackoverflow.com/a/9143193/1751090">here</a>). I cannot get them to sync up. </p>
  
  <p>Please help me understand how to communicate the <code>SelectedItem</code> property of my ChildViewModel to my ParentViewModel. I do not bind my TreeView to a <code>CollectionView</code>, so I am unable to get the <code>CurrentItem</code> in the view collection.</p>
  
  <p>My viewmodel collections I'm dealing with are very query-heavy, so I've not included any code for now. Please let me know what is needed for clarity.</p>