Exemplo n.º 1
0
        private void NextImage_Tap(object sender, ManipulationCompletedEventArgs e)
        {
            if (!IsTap(e.TotalManipulation.Translation))
            {
                return;
            }
            int index = GetCurrentImageIndex();

            if (index != -1 && index < _collectionVm.TotalPhotos)
            {
                index++;

                if (index >= _collectionVm.Photos.Count)
                {
                    _collectionVm.NextPage(
                        () =>
                    {
                        this.DataContext = _collectionVm.Photos[0];
                    }
                        );
                }
                else
                {
                    this.DataContext = _collectionVm.Photos[index];
                }
            }
        }