Automatic Scrolling in a Silverlight List Box

前端 未结 4 1239
情歌与酒
情歌与酒 2020-12-18 21:46

How can I programmatically force a silverlight list box to scroll to the bottom so that the last item added is always visible.

I\'ve tried simply selecting the item

4条回答
  •  离开以前
    2020-12-18 22:02

    Use the ListBox's ScrollIntoView method passing in the last item. You may need to call UpdateLayout immediately before it for it to work.

提交回复
热议问题