views:

261

answers:

2

I have a scrollview containing a ListBox. I would like the scrollview to scroll all the way to the bottom by default when the view has been loaded! This because the most recent element is always the last element in the ListBox.

Is there an easy way to achieve this behavior?

Thanks

+1  A: 

Yes, there is a easy way.

lv.ScrollIntoView(lv.Items[0]);

This will scroll to the first item. All you need to do is to find your last item.

Holli
+2  A: 

If you have access to the ScrollViewer, you could also use the ScrollViewer.ScrollToBottom() method.

gehho