WPF treeview: "non listed items" -


based on model want build treeview. me turns out problem, members of collection can displayed in treeview. means, have create viewmodel containing collection holds properties of model.

i want build tree this:

house
  adress
  color
  numberofrooms
  family
   father
   mother
   daughter
    age
    hair color
    friends
     ...
  pets
   dog
   mouse

my house model has property adress, color, numberofrooms, family , pets. not of lists, , house isnt list either. have put properties in list of objects displayed in tree fashion, , create hierachical datatemplate each of properties. doing once not big deal, have many models deal with, doesnt seem right way...

i know make hierachical datatemplate house type, put "house" in header of expander, , add textboxes each non list list property ... ugly.

is there common approach kind of datastructure / model ?

it turns out using multibinding + converter pretty elegant solution.

here link http://www.hardcodet.net/2008/12/heterogeneous-wpf-treeview


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -