Autoscroll when dragging item in TreeView

9 posts, 0 answers
  1. rubenhak
    rubenhak avatar
    58 posts
    Member since:
    Dec 2008

    Posted 28 Oct 2009 Link to this post

    Hi,

    I have a TreeView in my WPF application. Items are allowed to be dragged within the same TreeView. However, while dragging the item, the TreeView does not automatically scroll vertically when mouse approaches top or bottom borders. 

    I want a similar behavior like in Windows Explorer. When dragging a folder/file if the mouse approaches the border it performs automatic scroll. Otherwise it would be impossible to operate if you have large number of nodes in the tree.

    Thank you,
    Ruben.
  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 01 Nov 2009 Link to this post

    Hi Ruben,

    The Q2 version of the TreeView does support AutoScroll but you need to continue moving the mouse when you are near the end of the TreeView.

    In the Q3 release this has been improved so that moving the mouse is not necessary, and it works as  you describe it.

    The new version will be out soon and you will be able to see for yourself whether it is what you had in mind.

    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. rubenhak
    rubenhak avatar
    58 posts
    Member since:
    Dec 2008

    Posted 01 Nov 2009 Link to this post

    Hi Miroslav,

    Could you please provide a small example which demonstrate existing version of AutoScroll. It seems like I couldn't even make it happen.

    Thanks,
    Ruben
  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 02 Nov 2009 Link to this post

    Hi Ruben,

    You can see this in the WPF online examples:

    http://demos.telerik.com/wpf/

    Go to the DragAndDrop -> Tree To Grid example. There you can start dragging a TreeView item and as you reach the bottom of the ScrollViewer of the TreeView and you move your mouse in this area, the TreeView will scroll.

    Does this 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.
  6. Mike
    Mike avatar
    5 posts
    Member since:
    Aug 2011

    Posted 01 Mar 2012 Link to this post

    I am using 2012 Q1 build and we are having the same problem, the auto scrolling on drag does not work in our application or the demos.  Any ideas why it might not be?
  7. Felix
    Felix avatar
    17 posts
    Member since:
    Jun 2011

    Posted 01 Mar 2012 Link to this post

    The same for me. Autoscroll does not happen in RadTreeView while dragging (using 2012.Q1 with latest Hotfix).

    Is there any special setting neccessary? Please provide a little demo, thanks!

    Or is it a bug?

    Regards
    Felix


  8. Felix
    Felix avatar
    17 posts
    Member since:
    Jun 2011

    Posted 01 Mar 2012 Link to this post

    Ups!

    Found it:
    http://www.telerik.com/community/forums/wpf/treeview/treeview-drag-and-drop.aspx

    See sample project here. It works fine!

    Felix


  9. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 02 Mar 2012 Link to this post

    Hello Felix and Mike,

     That's it . Currently, you need to add this behavior (in the mentioned project). Please excuse us for the inconvenience caused.

    All the best,
    Petar Mladenov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  10. Mike
    Mike avatar
    5 posts
    Member since:
    Aug 2011

    Posted 02 Mar 2012 Link to this post

    This blog provides a variation of the behavior that can be attached via markup rather than using code behind.

    http://blogs.telerik.com/kirilstanoev/posts/10-11-25/how-to-implement-autoscroll-while-dragging-in-radtreeview.aspx

    Mike
Back to Top
UI for WPF is Visual Studio 2017 Ready