I have tried ScrollIntoView() but that doesn't work because the item may or may not be in viewport.
I tried WinRTXAMLToolkit (VisualTreeHelper class):
var scrollViewer = listView.GetFirstDescendantOfType(); scrollViewer.ChangeView(null, scrollViewer.ScrollableHeight, null);
It doesn't scroll to bottom every time, and when it does not, it scrolls to slightly above (from bottom).
ListView.ScrollIntoView(ListView.Items[ListView.Items.Count - 1] as YourModel, ScrollIntoViewAlignment.Leading);
仅当您在Viewport
显示后没有图像或任何其他元素时,此选项才有效。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.