public void ScrollStop() { if (IsScrolling) { IsScrolling = false; service.Clicked -= DragClicked; scrollTimer.Stop(); if (scroll != null) { scroll.Dispatcher.Invoke(() => { scroll.Close(); scroll = null; }); } } }
public void ScrollStart(Point startPt) { if (!IsScrolling) { IsScrolling = true; if (scrollTimer == null) { scrollTimer = new DispatcherTimer(); scrollTimer.Interval = TimeSpan.FromMilliseconds(500); scrollTimer.Tick += delegate { service.Clicked += ScrollClicked; scrollTimer.Stop(); }; } scrollTimer.Start(); scroll = new ScrollCursorWindow(startPt.ToPoint()); scroll.Show(); } }