This is a migrated thread and some comments may be shown as answers.

Drag and Drop Cue issue

1 Answer 42 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 23 Jul 2010, 12:01 PM
Hi

I have an issue when starting a drag and drop on a control.
I have a control which has a title bar, which is used as the drag zone. When dragging, I generate a Writeable bitmap of the control to use as the DragCues image source (done in OnDragInfo event handler).
Sometimes, normally when moving your mouse (fairly quickly) before clicking and dragging the control, the DragCue is positioned where your mouse has moved to after the click, but the mouse cursor is reset to the center of the DragCue. This only seems to happen when moving the cursor up. Doing the same down, left and to the right, the cursor and DragCue are positioned as expected.

It could have something to do with the generation of the bitmap taking some time, and once complete, the mouse has moved, and so the DragCue is positioned when the mouse currently is. But the mouse is reset to the middle of the DragCue for some reason?

Hope this is clear.

Thanks in advance,
Greg

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 28 Jul 2010, 04:17 PM
Hi Greg,

As I am not entirely sure how you implement your scenario, I cannot tell for sure what is causing the issue. However, Well, the delay caused by the generation of the bitmap is the most probable cause.

If this is indeed the case you can try calling the UpdateLayout() method of the DragCue in the DragInfo() event handler or you can implicitly set size to the writable bitmap used as a DragCue.

Give this approach a try and let me know if it works for you. However, if this doesn't help, if you can send us a sample project illustrating the issue we will be able to further investigate it.

All the best,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DragAndDrop
Asked by
Greg
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or