ck_russ
Topic Author
Posts: 22
Joined: 20 May 2020, 14:41

Noesis DragDrop.DoDragDrop incorrectly reporting effects

30 Jun 2020, 06:53

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))
                            {
                                EndDragCommand.Execute(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?

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 1881
Joined: 22 Dec 2011, 19:20

Re: Noesis DragDrop.DoDragDrop incorrectly reporting effects

03 Jul 2020, 13:59

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
 
ck_russ
Topic Author
Posts: 22
Joined: 20 May 2020, 14:41

Re: Noesis DragDrop.DoDragDrop incorrectly reporting effects

10 Jul 2020, 07:33

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.

Who is online

Users browsing this forum: No registered users and 6 guests