-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag source ignore issue in ListView #350
Comments
I checked a little bit the code and search what could be the cause. I found that in the
I could not find the exact line where we are testing if the user has clicked on a scrollbar/scrollviewer : var elementPosition = e.GetPosition((IInputElement)sender);
if (e.ClickCount != 1
|| (sender as UIElement).IsDragSourceIgnored()
|| (e.Source as UIElement).IsDragSourceIgnored()
|| (e.OriginalSource as UIElement).IsDragSourceIgnored()
|| (sender is TabControl) && !HitTestUtilities.HitTest4Type<TabPanel>(sender, elementPosition)
|| HitTestUtilities.HitTest4Type<RangeBase>(sender, elementPosition)
|| HitTestUtilities.HitTest4Type<TextBoxBase>(sender, elementPosition)
|| HitTestUtilities.HitTest4Type<PasswordBox>(sender, elementPosition)
|| HitTestUtilities.HitTest4Type<ComboBox>(sender, elementPosition)
|| HitTestUtilities.HitTest4GridViewColumnHeader(sender, elementPosition)
|| HitTestUtilities.HitTest4DataGridTypes(sender, elementPosition)
|| HitTestUtilities.IsNotPartOfSender(sender, e))
{
return;
} I tried to add this test in the condition :
And, after testing each showcase present in the What do you think ? |
Hello everyone,
I want to thank you very much for this library that always helped me in every project where I need to code Drag&Drop feature. I open this issue for a corner case that I discovered today, here is the explanation :
Issue
I have a problem with the DragSourceIgnore property that is not working totally. In a ListView WPF control I set for each ListViewItem the
dragdrop:DragDrop.DragSourceIgnore
toTrue
. The only way to move the ListViewItem is to left click with the mouse on the drag icon on the left (like in the image below).The problem is, when we go at the bottom of the list and you left click (like you want to drag something) on the red area here below, the last module is dragged in the list.
Steps to reprodue
To reproduce this issue you can use the
Showcase.WPF.DragDrop.exe
that you have created and select the example :Mixed -> Cloning
Expected outcome
Don't drag the module if we are in an ignored area.
Environment
The text was updated successfully, but these errors were encountered: