Page 1 of 1

Noesis DragDrop.DoDragDrop incorrectly reporting effects

Posted: 30 Jun 2020, 06:53
by ck_russ
The easiest way to observe this issue is in the Inventory sample project. Take an item from the inventory and drag it off screen. Inventory-Blend will correctly report the drag as failing and everything will work as it should. Inventory-Windows will report it as a success which will end up putting the project into an invalid state. The key code block in that project (DragItemBehavior.cs) is:
                    DragDrop.DoDragDrop(this.AssociatedObject, item, DragDropEffects.Move,
                        (source, data, target, dropPoint, effects) =>
                            bool dragSuccess = effects != DragDropEffects.None;
                            if (EndDragCommand != null && EndDragCommand.CanExecute(dragSuccess))
So it would seem that Noesis.DragDrop.DoDragDrop is not setting the effects to DragDropEffects.None when it should. As it seems this could possibly be OS related, I am currently testing this on a Windows 7 system. For the same reason the Inventory-windows project is using a WGL instead of D3D11 RenderContext.

One other question, is it more convenient for you guys to post things like this on the forum or should I instead post it over on the Bugtracker by default?

Re: Noesis DragDrop.DoDragDrop incorrectly reporting effects

Posted: 03 Jul 2020, 13:59
by sfernandez
Well, Inventory-Blend also fails if drop target allows drag-drop operations, for example if you release the mouse while over Visual Studio text editor, in that case items will also disappear.

Anyway our code is wrong, it should report DragDropEffects.None when dropping outside the window, because we don't support drag-drop operations between different processes yet. We'll fix it for the next release: #1746

Re: Noesis DragDrop.DoDragDrop incorrectly reporting effects

Posted: 10 Jul 2020, 07:33
by ck_russ
Appreciated. When posting this thread at first I did not realize how the inventory sample was setting the resultant effects. Yeah, this now makes much more sense.