WPF, TreeView bug, can't select root item after item removed from treeview

Posted by user275587 on Stack Overflow See other posts from Stack Overflow or by user275587
Published on 2010-05-29T03:23:55Z Indexed on 2010/05/29 3:32 UTC
Read the original article Hit count: 575

Filed under:
|
|
|
|

I have a very weird bug in a three level deep TreeView. It is intermittent and I can't find how to reproduce it consistently. After programmatically removing, adding then removing some third level items, when I click on the root item it isn't selected. It can still expand/collapse but can't be selected with a mouse click and it doesn't fire ItemSelectionChange event. You can click to select a second level or third level items and after that you're finally able to select the root item. I've tried to set IsSelected = false for all items after removing and tried to do a nice clean-up when removing items but it doesn't help. Did anybody run into that bug? Do you have any suggestions to remove this bug?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about treeview