private void CarouseView_ItemSwiped(PanCardView.CardsView view, PanCardView.EventArgs.ItemSwipedEventArgs args) { int currentIndex = 0; if (args.Direction == PanCardView.Enums.ItemSwipeDirection.Right) { currentIndex = carouseView.SelectedIndex - 1; } else if (args.Direction == PanCardView.Enums.ItemSwipeDirection.Left) { currentIndex = carouseView.SelectedIndex + 1; } int next_index = (currentIndex + 1); if (next_index > viewModel.ImageSlideCount) { next_index = 1; } else if (next_index < 1) { next_index = viewModel.ImageSlideCount; } viewModel.CurrentSlideImageIndex = next_index; }
private async void coverFlowView_ItemSwiped(CardsView view, PanCardView.EventArgs.ItemSwipedEventArgs args) { // coverFlowView.IsEnabled = false; if (args.Item == null) { return; } currentItem = args.Item as ImageStorage; currentUserIdSelected = currentItem.id; if (args.Direction == PanCardView.Enums.ItemSwipeDirection.Left) { //await dislikeUser(); await autoDislikeOldUserSwipe(); } else if (args.Direction == PanCardView.Enums.ItemSwipeDirection.Right) { var sample = args.Item; await likeUser(); } //coverFlowView.IsEnabled = true; if (coverFlowView.ItemsCount == 1) { maxReachFrame.IsVisible = true; } }
private void Caroussel_ItemSwiped(PanCardView.CardsView view, PanCardView.EventArgs.ItemSwipedEventArgs args) { /* if (this.ImovelDetail.Imovel.video != null) * { * if (this.ImovelDetail.Imovel.video != "") * { * if (view.SelectedItem.ToString().Contains("youtube")) * { * Videc.Source = view.SelectedItem.ToString(); * caroussel.IsVisible = false; * * * Videc.IsVisible = true; * box1.IsVisible = true; * box2.IsVisible = true; * * * * * } * // VideoC.isVisible = true; * // ImagemC.isVisible = false; * } * } * else * { * //VideoC.isVisible = false; * //ImagemC.isVisible = true; * }*/ }