I want to let the user to reArrange the displayed records
by making drag and drop between records could any one tell me the first steps to do that
Hello Hua,
I believe you meant "can work with left mouse button". I am attaching that sample too (without the images)
Hello Alex,
I got "DragDropXamGrids test.zip" from helpdesk, it works with right mouse button. If your modified copy can work with right mouse button to drag and drop a record in datagrid, please send the copy to me.
Thanks in advance,
Hua
Hello Kyryll,
I reproduce this issue. I modified my example a little to fix that. The issue is coming from the type of events. They are being handled, because you are using the bubbling type. Try with the PreviewMouseLeftButtonDown and PreviewMouseRightButtonUp and it should work, as it works with me. If you still have problems, I will send you my modified copy of the project.
Alex.
Hi again Alex :)
I have looked at your example of drag and drop functionality and I have converted it to use left mouse button instead of right one. That bit of it works just fine and thank you for leading the way :)
However, something else doesnt seem to work: In my case I have multiple xamgrids each one on different dock manager panel. It appears that once the mouse button is pressed while mouse was over the grid on the dockpanel that dock panel remains "active" even if you move the mouse away from it. so I never get the mouse enter or the mouse move events on any other component in the same application.
Can you share any thoughts on this subject?
Regards,
Kyryll
This is how I decided to implement this as I did not to interfere with the current functionality and use a different approach. The WPF framework does not support drag&drop directly, but gives you the freedom to handle the Drag, Drop, DragEnter events and their tunneling equivalents, so you can try that as well.