Hi, I wrote a very simple WPF application which has a listview and 2 buttons. The listview is initiated with 3 items. The button 'Add' when clicked will add new item to the list. The button 'Change' when clicked will change the selected item content. The bug raises when we click this 2nd button.
I upload the solution codes here. In the 'ChangeRow0_Click' method, I implement the 'Change' button clicked handler: assigning new instance directly to the current index. This raises the bug: the highlighting of the listview could not disappear and we cannot deselect it!
If I changed the handler's codes as: remove current item and add new instance to the list at the current index and reset the selected index, then the bug does not appear.
I consider this is .Net ObservableCollection bug when using operator [index]. Please correct me if I were wrong.