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

            int index = GetCurrentImageIndex();

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