Reputation: 6330
I have a ListBox that I've bound to a List of ordered times. When the ListBox loads I'd like to show the item that will be next at the top of the screen.
Is there a way to do this in WP7 using MVVM? I've looked around and there seems to be solutions for WPF but I can't seem to find any for WP7.
Upvotes: 0
Views: 498
Reputation: 84724
I can think of two ways of doing this:
ScrollIntoView
when the value changes (this method seems cleaner, but I'm not 100% sure it will work on WP7's Silverlight 3 runtime)It's worth noting that ScrollIntoView
only ensures the value is visible, not that it's at the top.
Upvotes: 1