Пример #1
0
 void ScrollToIndex(int targetIndex)
 {
     _hScrollView.Post(new Runnable(() =>
     {
         _hScrollView.SmoothScrollTo(targetIndex * _hScrollView.Width, 0);
     }));
 }
        void ScrollToIndex(int targetIndex)
        {
            var targetX = targetIndex * _scrollView.Width;

            _scrollView.Post(new Runnable(() => {
                _scrollView.SmoothScrollTo(targetX, 0);
            }));
        }
Пример #3
0
        void ScrollToIndex(int targetIndex)
        {
            Log.Debug(tag, "~ Renderer - ScrollToIndex method started");


            var targetX = targetIndex * _scrollView.Width;

            _scrollView.Post(new Runnable(() => {
                _scrollView.SmoothScrollTo(targetX, 0);
            }));
        }
Пример #4
0
 void ScrollToIndex(int targetIndex)
 {
     try{
         var targetX = targetIndex * _scrollView.Width;
         _scrollView.Post(new Runnable(() =>
         {
             _scrollView.SmoothScrollTo(targetX, 0);
         }));
     }
     catch (System.Exception ex)
     {
         Insights.Send("ScrollToIndex", ex);
     }
 }
Пример #5
0
        private void handlePageBtnClick(ViewerPageButton b)
        {
            if (b != _activeBtn && _nextActiveBtn == null)
            {
                _nextActiveBtn = b;

                setBtnDisplay(b, true);
                scrollToPageBtn(b);

                _pageScroll.Post(() =>
                {
                    OnPageButtonHit?.Invoke(b, EventArgs.Empty);
                });
            }
        }
Пример #6
0
        void ScrollToIndex(int targetIndex, int width = 0)
        {
            var targetX = 0;

            if (width == 0)
            {
                targetX = targetIndex * _scrollView.Width;
            }
            else
            {
                targetX = targetIndex * width;
            }
            _scrollView.Post(new Runnable(() => {
                _scrollView.SmoothScrollTo(targetX, 0);
            }));
        }
 void ScrollToIndex(int targetIndex)
 {
     try
     {
         ((CarouselLayout)this.Element).SelectedIndex = targetIndex;
         var targetX = targetIndex * _scrollView.Width;
         _scrollView.Post(new Runnable(() =>
         {
             _scrollView.SmoothScrollTo(targetX, 0);
         }));
         if (((CarouselLayout)Element).OnSwipe != null)
         {
             ((CarouselLayout)Element).OnSwipe.Invoke(null, ((CarouselLayout)this.Element).SelectedIndex);
         }
     }
     catch (System.Exception ex)
     {
     }
 }
        void ScrollToIndex(int targetIndex, int width = 0)
        {
            var targetX = 0;

            if (width == 0)
            {
                targetX = targetIndex * _scrollView.Width;
            }
            else
            {
                targetX = targetIndex * width;
            }
            _scrollView.Post(new Runnable(() => {
                _scrollView.SmoothScrollTo(targetX, 0);
            }));

            var carouselLayout = (GalleryCarouselView)this.Element;

            carouselLayout.SelectedItem = carouselLayout.ItemsSource [targetIndex];
        }