private async void TapGestureRecognizer_Tapped(object sender, EventArgs e) { var item = (sender as View).BindingContext as ItemsViewModel; SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, item.Name); await Navigation.PushAsync(new SeatingDetailsView(item)); }
private async Task ExeccuteNavigateToDetailPageCommand(Product product) { var page = (App.Current.MainPage as SharedTransitionNavigationPage).CurrentPage; SharedTransitionNavigationPage.SetTransitionSelectedGroup(page, product.Id); await Navigation.PushAsync(new DetailPage(product)); }
async void OnGoToProductDetail(GoToProductDetailMessage obj) { App.Model.SelectedGatos = obj.Gatos; Page p = ((NavigationPage)App.Current.MainPage).CurrentPage; SharedTransitionNavigationPage.SetTransitionSelectedGroup(p, obj.Gatos.Name); await Navigation.PushAsync(new ProductDetailPage()); }
private async void BooksListView_ItemTapped(object sender, ItemTappedEventArgs e) { // set the selected book ((BooksViewModel)BindingContext).SelectedBook = e.Item as Book; SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, ((BooksViewModel)BindingContext).SelectedBook.Title); await Navigation.PushAsync(new SwapDetails()); }
async void Image_Tapped(System.Object sender, System.EventArgs e) { var model = (sender as Image).BindingContext as Coffee; //this is required in order to pass the views to animate SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, model.Title); await Navigation.PushAsync(new DetailPage(model)); }
private async void Destination_Tapped(object sender, EventArgs e) { if ((sender as BindableObject).BindingContext is Destination destination) { SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, destination.Id.ToString()); await Navigation.PushAsync(new DestinationPage(destination)); } }
private async void OnCollectionViewSelectionChanged(object sender, SelectionChangedEventArgs e) { SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, "Banner"); var item = e.CurrentSelection[0]; Item obj2 = JsonConvert.DeserializeObject <Item>(JsonConvert.SerializeObject(item)); await Navigation.PushAsync(new DetailNotice(obj2)); }
private async void MyItems_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.CurrentSelection.Any()) { MyItems.SelectedItem = null; var getItemSelectData = e.CurrentSelection.FirstOrDefault() as Item; SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, getItemSelectData.Id.ToString()); await Navigation.PushAsync(new MainPageDetails(getItemSelectData)); } }
private async void ItemsListView_ItemTapped(object sender, ItemTappedEventArgs e) { var tappedItemData = e.Item as Item; //this is required in order to pass the views to animate SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, tappedItemData.Id); SharedTransitionNavigationPage.SetTransitionDuration(this, 200); SharedTransitionNavigationPage.SetBackgroundAnimation(this, BackgroundAnimation.Flip); await Navigation.PushAsync(new ItemDetailPage(tappedItemData)); }
private async void MainCollectionView_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (MainCollectionView.SelectedItem != null) { ShoeDetail detail = e.CurrentSelection[0] as ShoeDetail; DetailPage Page = new DetailPage(detail); SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, detail.Price); await Navigation.PushAsync(Page); } MainCollectionView.SelectedItem = null; }
/// <summary> /// If a row is selected, move to the next page. /// </summary> /// <remarks> /// It's clearly the UI layer's job. /// </remarks> async void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e) { if (e.SelectedItem != null) { var page = new RandomUserDetailsPage(); var user = e.SelectedItem as User; page.BindingContext = user; page.Title = $"{user.FullName} ({user.Gender})"; SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, user.FullName); await Navigation.PushAsync(page); listView.SelectedItem = null; } }
private void TapGestureRecognizer_Tapped(object sender, EventArgs e) { // get the position //var position = MyCarousel.Position; var selectedItem = MyCarousel.CurrentItem as ItemsViewModel; if (selectedItem == null) { System.Diagnostics.Debug.WriteLine("Can't get current item"); } else { SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, selectedItem.Name); Navigation.PushAsync(new ProductDetailsPage(selectedItem)); } }
async void ProductOverview_SelectionChanged(System.Object sender, Xamarin.Forms.SelectionChangedEventArgs e) { if (e.CurrentSelection.Any()) { // Reset selection ProductOverview.SelectedItem = null; // Get the item we're opening. var tappedItemData = e.CurrentSelection.FirstOrDefault() as Product; // This is required in order to pass the views to animate SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, tappedItemData.Name); await Navigation.PushAsync(new DetailPage(tappedItemData)); } }
private void ProductSelected(object sender, SelectionChangedEventArgs e) { SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, vm.SelectedProduct.Name); vm.ShowDetails(); }
async void OnStoreItemChange(StoreItem newItem) { SetPageAnimation(BackgroundAnimation.Fade, 300); SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, newItem.Name); await Navigation.PushAsync(new Content_DetailedStoreItemPage(newItem)); }
private async void OnHighlightTapped(object sender, System.EventArgs e) { SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, "Banner"); var context = (sender as View).BindingContext; await Navigation.PushAsync(new ArtDetailView(context)); }