-
Notifications
You must be signed in to change notification settings - Fork 704
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
Make consistency behaviour when clicking on a unselected item or clicking on a selected item #589
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks good me. I guess my question is why selected and unselected item clicks go to different function? Can they be handled together in ChangeSelection?
Background: So event looking like this: When clicking on selected item, listview doesn't raise selectionchanged, so we can't move everything to ChangeSelection. |
Thanks for clarifying! |
🎉 Handy links: |
Fix #573
NavigationView has different logic for clicking on a selected item and click on unselected item.
We try to close the pane when clicking on unselected item which is implemented in ChangeSelection.
When clicked on a selected item, ChangeSelection is not called, but we have special logic in OnItemClick to know about it and raise ItemInvoked event to customer.
This fix would try to close pane for both cases, so I extract the code to ClosePaneIfNeccessaryAfterItemIsClicked, and call it in both ChangeSelection and OnItemClick.