This question is locked. New answers and comments are not allowed.
Hi,
I encountered an problem with setting SelectedItem from ViewModel.
It occurs when I'm adding and/or removing an item from TreeView. After that action I force the SelectedItem to be set to actually added item, or the item following deleted one.
Everything seems to be ok, but as You can see at attached screenshot, the item I'm trying to select is red one, but around other item (when adding the one, that was previously selected, when deleting - it seems it's a random element) is a light selection.
And then it works as follows:
1. When performing any action on "SelectedItem" - the action is performed on red item.
2. When moving selection using up/down keys - next selected item is above/belowe the item with light selection.
It's a bit confusing for users, who operate with keybord, e.g. removing some item...
I encountered an problem with setting SelectedItem from ViewModel.
It occurs when I'm adding and/or removing an item from TreeView. After that action I force the SelectedItem to be set to actually added item, or the item following deleted one.
Everything seems to be ok, but as You can see at attached screenshot, the item I'm trying to select is red one, but around other item (when adding the one, that was previously selected, when deleting - it seems it's a random element) is a light selection.
And then it works as follows:
1. When performing any action on "SelectedItem" - the action is performed on red item.
2. When moving selection using up/down keys - next selected item is above/belowe the item with light selection.
It's a bit confusing for users, who operate with keybord, e.g. removing some item...