DragDropEventArgs.DragDropOptions -> CurrentDragPoint but no GetPosition method

3 posts, 0 answers
  1. Diego
    Diego avatar
    11 posts
    Member since:
    May 2009

    Posted 18 Sep 2009 Link to this post

    Hi to all,
    i'm using RadDragAndDropManager to make possible to drag a TreeViewItem to a MindFusion Wpf Diagram...to make the game more complex we use the AvalonDock component to handle dock interface.
    Actually all the staff work quite well but i have a problem about the DragDropEventArgs and the mouse position. i don't find a way to get the correct mouse coordinate when i drop the treeviewitem into the diagram. On many other event args as for example MouseButtonEventArgs i could get the correct position using the method: e.GetPosition(diagramInstance)...but i don't find a way to do it with the DragDropEventArgs.

    Any advice?

    Really thanks.
    Diego




  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 18 Sep 2009 Link to this post

    Hello Diego,

    Yes, currently you do not have the GetPosition method.

    You can use the e.Options.CurrentDragPoint to get the position of the mouse with relation to the window in which the DragDrop occurs.

    If you want to get the mouse position with relation to an element, you can transform this element (element.TransfromToVisual(currentWindow).Transforn(new Point()) with relation to the window and substract the two points.

    Do you think this will work for you?

    Regards,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Diego
    Diego avatar
    11 posts
    Member since:
    May 2009

    Posted 18 Sep 2009 Link to this post

    Really thanks!
    It works!

    Diego
Back to Top