Tag Archives: windows 8 Tutorials

Windows 8 ListView Scrolling With SelectedIndex / SelectedItem

For windows 8 ListView Scrolling With SelectedIndex / SelectedItem we can call the method ScrollIntoView(object item) after the ListView is loaded to scroll to the currently selected item. Make sure the control is loaded before you try to make the call

private void itemListView_Loaded(object sender, RoutedEventArgs e)
{
    itemListView.ScrollIntoView(itemListView.SelectedItem);
}

One more example:-
private void btnNextNews_Click(object sender, TappedRoutedEventArgs e)
 {
    CurrentIndex++;
    itemListView.SelectedIndex = CurrentIndex;
    itemListView.ScrollIntoView(LV_NewsDetail.SelectedItem);
}

 

Skip to toolbar