Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 public void SendScrollStopped()
 {
     ScrollStopped?.Invoke(this, EventArgs.Empty);
 }