In a Windows Phone 7 Silverlight app, I have a ListBox with a lot of items, that are generated dynamically from an external data source. One of these items will be "current", so I would like to programmatically scroll the ListBox so the item appears as the topmost visible item in the ListBox - so the user doesn't have to.
There is
listBox.ScrollIntoView(itemOfInterest);
But that will only scroll so much, that the itemOfInterest
is at the bottom of the ListBox.
How can I programmatically scroll a ListBox, so a specific item appears at the top of the viewport ?