Ejemplo n.º 1
0
 private void OnReachBottom()
 {
     if (ReachBottom != null)
     {
         ReachBottom.Invoke();
     }
 }
Ejemplo n.º 2
0
        private void listBox_VerticalScrollBar_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            ScrollBar sb = sender as ScrollBar;

            if (sb.Value >= sb.Maximum - 50)
            {
                if (DateTime.Now - lastRaiseTime < TimeSpan.FromSeconds(2))
                {
                    return;
                }

                ReachBottom?.Invoke(this, new EventArgs());
                lastRaiseTime = DateTime.Now;
            }
        }