Hi,
I've been trying to enable code-initiated scrolling in a RadTreeView object. The idea is that after a new item is added to the RadTreeView, the component scrolls to this new component so a user may edit the items name. I've tried:
RadTreeViewItem.BringIntoView()
RadTreeView.ScrollView.ScrollToItem()
RadTreeView.ScrollView.ScrollToVerticalOffset()
All have no effect on the contents of the RadTreeView. Scrolling works fine with the mouse. I've also tried wrapping these calls with:
RadTreeView.UpdateLayout()
RadTreeView.ScrollViewer.InvalidateScrollInfo()
which didn't help.
After reading about ScrollViewer in detail, I tried implementing a separate scrollview to contain the RadTreeView, but that didn't work very well.
How can I scroll via code?
Thanks,
Trevor
Silverlight version: 4.0
OS: Windows 7 64bit
Browser: Internet Explorer 8.0.7600.16385
Telerik Component: RadTreeView, Telerik.Windows.Controls.Navigatino.dll v2.0.50727
Language: C#
To Reproduce Behaviour:
-Create a RadTreeView with some entries
-Make browser window smaller, so that scrollbars appear
-Ensure scrolling works with mouse and mouse wheel
-Put button/code to call RadTreeView.* methods that are supposed to scroll contents