This is a migrated thread and some comments may be shown as answers.

Autoscroll when dragging item in TreeView

8 Answers 107 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
rubenhak
Top achievements
Rank 1
rubenhak asked on 28 Oct 2009, 06:45 PM
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.

8 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 01 Nov 2009, 01:07 PM
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.
0
rubenhak
Top achievements
Rank 1
answered on 01 Nov 2009, 07:13 PM
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
0
Miroslav
Telerik team
answered on 02 Nov 2009, 09:33 AM
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.
0
Mike
Top achievements
Rank 1
answered on 01 Mar 2012, 09:33 AM
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?
0
Felix
Top achievements
Rank 1
answered on 01 Mar 2012, 10:37 AM
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


0
Felix
Top achievements
Rank 1
answered on 01 Mar 2012, 11:08 AM
Ups!

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

See sample project here. It works fine!

Felix


0
Petar Mladenov
Telerik team
answered on 02 Mar 2012, 01:43 PM
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 >>
0
Mike
Top achievements
Rank 1
answered on 02 Mar 2012, 01:55 PM
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
Tags
TreeView
Asked by
rubenhak
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
rubenhak
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Felix
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or