I have a ScrollViewer
containing a ListBox
. I would like the ScrollViewer
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
If you have access to the ScrollViewer
, you could also use the ScrollViewer.ScrollToBottom()
method.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With