public void OnScrollingEnd() { int oldScrollCount = 0; while (true) { Task.Delay(100).Wait(); if (oldScrollCount == scrollCount) { isScrolling = false; scrollCount = 0; if (isScrollingByCode) { isScrollingByCode = false; } else { isScrollingByCode = true; ScrollStopped?.Invoke(this, null); if (!freeze) { SmoothScrollTo(((View)Parent).Width, 0); } } break; } oldScrollCount = scrollCount; } }
public void SendScrollStopped() { ScrollStopped?.Invoke(this, EventArgs.Empty); }