I am in a WPF rat hole...and would very much appreciate help.
I have a treeview. When the user clicks on a node, I display a listview with an itemtemplate of a radiobutton and a textblock. The ItemsSource is static and is used for every object in the tree.
The itemsSource is a collection of objects with two properties, IsChecked, TextBlock.
When a user clicks on a different treenode, I need to set one of the radio buttons in the listview control to checked that corresponds with a value in the treenode object.
Likewise, if a user interacts with the listview by clicking on a radio button, I need to set a value in the object that represents the treenode.
The problem is in the timing. When a user switches back and forth quickly between two treenodes, invariably the wrong object ends up losing its value. I believe this happens because the
current treenode gets updated, but the control lags behind slightly.
Does anyone have an example of a listview with radio buttons where the itemssource is in the viewmodel and the object that is checked is stored in the model. (I can only get this to work if I store
the entire collection in each object). Hope this makes sense!