-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WPF ListBox moves focus to ListBox after item deleted #20
Comments
|
Selection works correctly because it operates on the view, not on the ListBox itself: See ListCollectionView.MoveCurrencyOffDeletedElement
|
Workaround:
|
Workaround for TreeView:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have a ListBox that can delete selected item.
Verify an item is both selected and focused (not the listbox itself), delete it by showing a confirmation dialog.
When the dialog is dismissed and the item is deleted, the selected item is correctly updated to the next item, but the focus returns to the ListBox itself (apparently because the item is gone).
So the focus and selection are dissynchronized, selection remains in the right place, but the focus switches to the parent listbox, so pressing Up or Down will just switch both the focus and the selection to the first element instead of navigating to the previous/next element.
The text was updated successfully, but these errors were encountered: