예제 #1
0
        /// <summary>
        /// Scrolls the DataGrid even when mouse is not over it.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
        {
            try
            {
                if (Scroller.IsMouseOver == false)
                {
                    if (e.Delta < 0)
                    {
                        Scroller.LineDown();
                        Scroller.LineDown();
                        Scroller.LineDown();
                    }

                    if (e.Delta > 0)
                    {
                        Scroller.LineUp();
                        Scroller.LineUp();
                        Scroller.LineUp();
                    }
                }
            }
            catch (Exception ex)
            {
                HandleException(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message);
            }
        }
예제 #2
0
        private void DownArrow_MouseDown(object sender, MouseButtonEventArgs e)
        {
            for (int index = 0; index < 30; index++)
            {
                Scroller.LineDown();
            }

            if (Scroller.ViewportHeight - Scroller.VerticalOffset < 30)
            {
                DownArrow.Visibility = Visibility.Hidden;
            }

            UpArrow.Visibility = Visibility.Visible;
        }
 private void LineDown(object sender, RoutedEventArgs e)
 {
     Scroller.LineDown();
 }