Reputation: 584
I'm using a long list selector in a WP8 application.
The items are grouped alphabetically.
When I'm navigating to this page, sometimes I want the list to be scrolled to one specific item from one group.
I tried the function ScrollTo(), but this can take me only to one specific group from the list.
Is there a way to achieve this?
Upvotes: 0
Views: 70
Reputation: 2616
Yes, there is a way to achieve that.
To explain it better to you i would need to know how you have the groups organized. I'll post here a sample that I hope can help you.
longListSelector.ScrollTo(((AlphaKeyGroup<Object>)longListSelector.ItemsSource[x])[y]);
Where x is the group index, and y is the item index inside the group
Upvotes: 1