Windows 10 ScrollIntoView() is not scrolling to the items in the middle of a listview

后端 未结 3 986
渐次进展
渐次进展 2020-11-28 10:04

I have a Listview with 20 items in it. I want to scroll the Listview programmatically.

ListView?.ScrollIntoView(ListView.Items[0])

will scr

3条回答
  •  广开言路
    2020-11-28 10:48

    ScrollIntoView just brings the item into the view, period, it does not scroll to a row.

    If you call it on a member and it is below the bottom of the visible list it scrolls down until the the item is the last member in the visible list.

    If you call it on a member and it is above the top of the list it scrolls up until the the item is the first member in the list.

    If you call it on a member and it is currently visible it does no operation at all.

提交回复
热议问题