0

I have started learning WPF and I've got question about TreeViewModel and data binding.

I already made my Tree based on this tutorial: WPF TreeView Tutor (last example about Family) and now I'd like to know: is it possible to make binding from TreeView to Object?

For example - is it possible to select TreeViewItem, find out its type (is it Family or is it FamilyMember) and cast it to proper class?

admdrew
  • 3,790
  • 4
  • 27
  • 39
  • You should build a ViewModel. Check out this related post: http://stackoverflow.com/questions/2688865/wpf-manually-generate-treeviewitem-container/2689051#2689051 – Bedford May 06 '14 at 21:23
  • Thank you for quick answer. I will focus on ViewModel and hope it helps. – Maciej Skoczek May 07 '14 at 06:01

0 Answers0