Improving / Fixing Selection Behavior (ItemSelectionEventTriggers) #21702
ArchLeaders
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
Note: My implementation currently has the side effect of breaking Ctrl+Click to add to the selection (selects on press and deselects on release). |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have been attempting to fix a bug in Xaml.Behaviors that caused press events on draggable elements implementing
ISelectableto be cancelled (e.Handled = true) early. (wieslawsoltes/Xaml.Behaviors#318)In that library, it was an intentional decision to avoid items being deselected when starting a drag event. (wieslawsoltes/Xaml.Behaviors@04b9138)
However, the root of the issue is Avalonia always selecting on the press event rather than waiting for release.
In Rider, for example, selecting a node that is already selected does not deselect the other nodes until releasing.
I have updated the selection behavior to act more like Rider here and plan to make a PR.
Since this is technically a feature, not a bug fix, I was hoping to discuss the change with the core team before making a PR.
And, if this is not something Avalonia can do, hopefully have some insight on the correct way to solve this problem.
All reactions