Drag and Drop Cue issue

2 posts, 0 answers
  1. Greg
    Greg avatar
    1 posts
    Member since:
    Jul 2010

    Posted 23 Jul 2010 Link to this post


    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,
  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 28 Jul 2010 Link to this post

    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
Back to Top