Пример #1
0
 private void ResetHorizontalScrollPosition()
 {
     _currentHorizontalScrollPosition = 0;
     Dispatcher.Invoke(new Action(() =>
     {
         ScoreScrollViewer.ScrollToHorizontalOffset(0);
     }));
 }
Пример #2
0
        private void UpdateHorizontalScrollPosition()
        {
            Dispatcher.Invoke(new Action(() =>
            {
                double actualScrollPosition;
                if (_currentHorizontalScrollPosition - _scrollOffset > 0)
                {
                    actualScrollPosition = _currentHorizontalScrollPosition - _scrollOffset;
                }
                else
                {
                    actualScrollPosition = 0;
                }

                ScoreScrollViewer.ScrollToHorizontalOffset(actualScrollPosition);
            }));
        }