get the mouse position while dropping

4 posts, 0 answers
  1. iven
    iven avatar
    6 posts
    Member since:
    May 2009

    Posted 02 Jun 2009 Link to this post

    Folks,

    I want to drag an icon and drop it on an cavas, while dropping I need to get the mouse release position to place the icon, but the (DragDropEventArgs)e.options.MouseClickEvent is not the position which the mouse released. is there any way to get the right position, thanks.

    iven.
  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 03 Jun 2009 Link to this post

    Hi Iven,

    You can use the CurrentDragPoint from the DragDrop options object during drop complete to get the mouse release position. The point is relative to the visual root object. I.e. something like:

    var releasePoint = e.Options.CurrentDragPoint

    Greetings,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. iven
    iven avatar
    6 posts
    Member since:
    May 2009

    Posted 03 Jun 2009 Link to this post

    Yes, you are right, currentdragposition works, thanks.
  5. Felickz
    Felickz avatar
    14 posts
    Member since:
    Aug 2012

    Posted 21 Sep 2011 Link to this post

    Naming of these variables caused me to have the exact same issue... i am looking for something related to mouse position, so we automatically went to the MouseClickEvent when instead we wanted the drop "LeftMouseUp" event aka CurrentDragPoint in this case

Back to Top