Detect when WPF listview scrollbar is at the bottom?

前端 未结 4 906
别那么骄傲
别那么骄傲 2020-12-17 17:17

Is there a way to detect if the scrollbar from the ScrollViewer in a ListView has reached the bottom of the virtual scroll space? I would like to

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-17 17:57

    For UWP I got it like this

    
        
    
    
    private void scroll_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
    {
        var scrollViewer = (ScrollViewer)sender;
        if (scrollViewer.VerticalOffset == scrollViewer.ScrollableHeight)
                btnNewUpdates.Visibility = Visibility.Visible;
    }
    

提交回复
热议问题