I\'m just trying to find a way to control the expand / collapse of the TreeView nodes through the object they\'re bound to. The object has an IsExpanded>
Came up with solution. Really simple:
So the style gets the object bound to the TreeViewItem and looks at its IsNodeExpanded attribute and it assigns that value to the TreeViewItem.IsExpanded property. If you add Mode=TwoWay, they'll notify each other (TreeViewItem will tell the object when it has been expanded).
Thanks!