Arrow offset

7 posts, 0 answers
  1. Jeff
    Jeff avatar
    10 posts
    Member since:
    Dec 2010

    Posted 09 Sep 2011 Link to this post

    How can I position the point of the ArrowCue with the point of the mouse cursor?  I've tried modifying the DragCueOffset but didn't see any difference. 
    See the telerik_arrow attachment to see what I'm currently getting. 
    See the telerik_arrow_want attachment to see what I would like to have. 

    We're using version 2011.1.315.1040 of the telerik controls.

    Thanks,
    Jeff
  2. Jeff
    Jeff avatar
    10 posts
    Member since:
    Dec 2010

    Posted 09 Sep 2011 Link to this post

    I was able to adjust the arrow position by changing e.Options.ArrowCue.Padding.


    Thanks,
    Jeff

  3. DevCraft banner
  4. Jeff
    Jeff avatar
    10 posts
    Member since:
    Dec 2010

    Posted 12 Sep 2011 Link to this post

    My padding suggestion didn't work.  It only worked when I dragged from left to right.  Any other direction the arrow wasn't in the correct position due to padding on the wrong side.

    I came across a Telerik sample project found in this post which is what I want:
    http://www.telerik.com/community/forums/silverlight/drag-and-drop/drag-drop-create-line-connection.aspx

    Notice the point of the arrow and the point of the mouse cursor are the same.  That's the effect I'm looking for.  The sample project uses Telerik control version 2010.1.422.1040.  I am using 2011.1.315.1040.  Is this a bug in 2011.1.315.1040 or what am I doing wrong?

    Thanks,
    Jeff



  5. Tsvyatko
    Admin
    Tsvyatko avatar
    832 posts

    Posted 13 Sep 2011 Link to this post

    Hi Jeff,

     Indeed, this is an issue in version 2011.1.315.1040. In this situation I can suggest one of the following solutions:

     - upgrade to more recent version;
     - use custom style for arrow as shown in the attached project.

    Greetings,
    Tsvyatko
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Jeff
    Jeff avatar
    10 posts
    Member since:
    Dec 2010

    Posted 20 Jan 2012 Link to this post

    The suggestion in the example code worked with Q1.2011.  Recently I upgraded to Q3.2011 and added RadDragAndDropManager.ExecutionMode = DragExecutionMode.Legacy to App.xaml.vb.

    The arrow displays but it is offset again, similar to my original question/post.  Any suggestions to make the point of the arrowcue to line-up with the point of the mouse arrow?


    Thanks,
    Jeff

  7. Tsvyatko
    Admin
    Tsvyatko avatar
    832 posts

    Posted 21 Jan 2012 Link to this post

    Hi,

     I have created sample project that illustrates how to implement custom arrow cue. That way you don't need to use legacy mode to display the arrow. In addition, you will have full control of the position and appearance of the arrow.

    Please have a look at the attachement and let us know if this helps.

    Kind regards,
    Tsvyatko
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Jeff
    Jeff avatar
    10 posts
    Member since:
    Dec 2010

    Posted 23 Jan 2012 Link to this post

    Thanks for the sample application.  I'm using a button as the source of the drag.  It looks like the exmaple you supplied is for a listbox.  I've attempted to modify this but I couldn't find a behavior for a button similar to ListBoxDragDropBehavior.  After searching the forum, it looks like you are trying to make the drag and drop feature easier to use for listboxes, gridview, and treeview (http://www.telerik.com/community/forums/silverlight/drag-and-drop/example-listbox-treeview-gridview-scheduleview-drag-drop-reorder-items-and-more.aspx)

    Do you have an exmaple for a button?
Back to Top
DevCraft banner