gong-wpf-dragdrop
gong-wpf-dragdrop copied to clipboard
Nested Drag Source + Touch
Describe the bug
I have a <ListView>
as a Drop Target. Inside of the list view collection, I have a specific <Thumb>
that is used as the Drag Source. When using the mouse it works perfectly. However, when using touch, it ends up scrolling the Scroll View, instead of grabbing the Drag Source.
To Reproduce Steps to reproduce the behavior:
- Create a
<ListView>
as a Drop Target - Create a
ListViewItem
Template that contains the Drag Source - Attempt to use a Touch Screen to grab the Drag Source
- See that it starts to scroll, instead of dragging
Expected behavior It should grab the Drag Source
Desktop (please complete the following information):
- OS: Windows 10
I'm able to somewhat work around this and accomplish what I want with:
private void UIElement_OnTouchDown( object sender, TouchEventArgs e )
{
if( sender is not Thumb thumb ) return;
DragDrop.DefaultDragHandler.StartDrag( new DragInfo( thumb, e )
{
Effects = DragDropEffects.Move, Data = thumb.DataContext
} );
e.Handled = true;
}
I got the same issue, is there something new for this bug?
best regards, Ivan