You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by IncPlusPlus September 13, 2022
Hi there. Thanks for making such an awesome library. I was searching around trying to find out how to make an item draggable in Avalonia and almost gave up until I found this. I've figured out how to make a single ListBox item draggable. However, my SelectionMode is set to multiple so multiple items can be selected. When I select multiple items and then start to drag, all items except the one I started the drag action on get deselected. Is there a way to make dragging respect the existing selection of items in a ListBox?
I tried removing the drag & drop behavior and discovered that this issue seems to be with Avalonia specifically. If I start making a dragging motion, the selection is cleared.
I made a discussion post a few months ago asking about this. As far as I can tell, dragging multiple items in a ListBox with SelectionMode="Multiple" is not possible. I've created this issue as an enhancement request.
Is it possible that support could be added for this scenario in the future? If not, do you know of a way I could avoid this issue? I was thinking maybe there was a way to stop the ListBoxItem from getting the PointerPressedEvent until it was followed by a PointerReleasedEvent && no drag had occurred. However, I'm not quite familiar enough with Avalonia to pull it off.
The text was updated successfully, but these errors were encountered:
Discussed in #109
Originally posted by IncPlusPlus September 13, 2022
Hi there. Thanks for making such an awesome library. I was searching around trying to find out how to make an item draggable in Avalonia and almost gave up until I found this. I've figured out how to make a single
ListBox
item draggable. However, mySelectionMode
is set to multiple so multiple items can be selected. When I select multiple items and then start to drag, all items except the one I started the drag action on get deselected. Is there a way to make dragging respect the existing selection of items in aListBox
?I tried removing the drag & drop behavior and discovered that this issue seems to be with Avalonia specifically. If I start making a dragging motion, the selection is cleared.
I made a discussion post a few months ago asking about this. As far as I can tell, dragging multiple items in a
ListBox
with SelectionMode="Multiple" is not possible. I've created this issue as an enhancement request.Is it possible that support could be added for this scenario in the future? If not, do you know of a way I could avoid this issue? I was thinking maybe there was a way to stop the
ListBoxItem
from getting thePointerPressedEvent
until it was followed by aPointerReleasedEvent
&& no drag had occurred. However, I'm not quite familiar enough with Avalonia to pull it off.The text was updated successfully, but these errors were encountered: