Make consistency behaviour when clicking on a unselected item or clicking on a selected item#589
Conversation
kaiguo
left a comment
There was a problem hiding this comment.
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.