DragCue object

3 posts, 0 answers
  1. Osi
    Osi avatar
    3 posts
    Member since:
    Oct 2008

    Posted 31 Oct 2008 Link to this post

    Hello,

    How can i get the position of the dragcue object when the dragstatus is on dropcomplete in the DropInfoEvent handler?
    I know there is a property CurrentDragPoint, but that's the position of the mouse cursor which is not the same as the position of the dragcue object.

    Thanks
  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 04 Nov 2008 Link to this post

    Hi Osi,

    Normally you can get the position of any element by TransformToVisual. This is how you get the top left (0,0) point of the DragCue, relative to the root element:

    var transform = (e.Options.DragCue as FrameworkElement).TransformToVisual(null);  
    var topLeft = transform.Transform(new Point(0, 0)); 

    This code will throw an exception in the current release (this actually is a bug in the Popup).  We have fixed this is the Q3 release of the controls (which will be available this week).

    Regards,
    Miroslav
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. Osi
    Osi avatar
    3 posts
    Member since:
    Oct 2008

    Posted 04 Nov 2008 Link to this post

    Yeah, i got the error too. I'm glad it will be fixed in the next release.
    Thanks!
Back to Top