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

Programmatically scrolling

1 Answer 318 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 27 Aug 2014, 01:29 PM
Hello,
is there a possibilility to programmatically scroll the ListBox to display a specific item, something like ScrollIntoView of the WPF list box ?
Patrick

1 Answer, 1 is accepted

Sort by
0
Accepted
Kalin
Telerik team
answered on 28 Aug 2014, 07:41 AM
Hi Patrick,

RadListBox provides a ScrollIntoView method as well. For example if you need to scroll to last item on button click, it should be done as shown below:

private void Button_Click(object sender, RoutedEventArgs e)
{
    this.listBox.ScrollIntoView(this.listBox.Items.Count - 1);
}

Hope this helps.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ListBox
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Kalin
Telerik team
Share this question
or