Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人说我可以使用ScrollIntoView的方法来处理这个问题,但是ScrollIntoView只能在逻辑上滚动ListBox,不能在物理上滚动。有什么办法可以让ListBox自动滚动,好像有人在平滑地拖动它的滚动条。
您可以使用 ScrollViewer 而不是 ListBox。ScrollViewer 具有 ScrollToVerticalOffset(Double offset) 和 ScrollToHorizontalOffset(Double offset) 方法,您可以使用它们来自动滚动它。