Selecting rows in Multiple/Row Mode is not consistent and intuitive
Description:
Selecting rows in Multiple/Row Mode is not consistent and intuitive.
Steps to Reproduce:
Set SelectionMode to Multiple and Selection Unit to Row. Select Rows using shift or click and drag select. Rows get toggled or selected. If you do the same on the native checkboxes, you can uncheck/check a row (that does the selection) then hold shift and click on the desired target row. All rows in the range get the state of the origin selected source row.
Expected behavior:
Make selection in the rows the same as in the over the roverheader checkbox.
I've actually written a fix to this that solves it, but I'm not sure how to make a seperate pull request.
The changes are here https://github.com/w-ahmad/WinUI.TableView/commit/fecdaefe48ce9b61632f23c03b622351438ead68
Here's what was going to use as a description
Not sure if this is fixing a bug or adding feature so I've added a property, UseListViewHotkeys that makes TableView in SelectionMode="Multiple" use ListView hotkeys.
In the default WinUI 3 ListView, when SelectionMode="Multiple,
- The 'Up' and 'Down' keys move the selection border
- 'Enter' toggles selection.
- 'Shift'+'Up'/'Down' when moving from a SelectedItem selects the destination item without deselecting other items anywhere. The new property causes TableView to be like this, whilst still maintaining "tab" to edit next cell, 'enter' to edit the below cell and all other hotkeys.
If set to false... it keeps the original behaviour.
In TableView, when SelectionMode="Multiple" and SelectionUnit is "Row".
(or the checkbox column if "RowOrColumn")
- 'Up' selects the destination item and keeps anything below it selected, deselecting all consequentive rows above it. (non-consequentive items stay selected
- 'Down' does the reverse.
- 'Left'/'Right' deselects all consequentive items but the current cell.
- 'Enter' behaves super weirdly, if the checkbox cell is highlighted, it selects the second row and moves the selection border to the second row whilst keeping the prior item selected. Otherwise it behaves like the 'Down' key.
- 'Shift' key has no effect. (I've checked TableView.SelectRows() so I'm surprised)
I also had a look at SelectionMode="Extended" but TableView/ListView behave the same.