Пример #1
0
        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));
        }
Пример #3
0
        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());
        }
Пример #4
0
 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());
 }
Пример #5
0
        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));
        }
Пример #6
0
        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));
            }
        }
Пример #7
0
        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));
        }
Пример #8
0
 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));
     }
 }
Пример #9
0
        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));
        }
Пример #10
0
 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;
 }
Пример #11
0
        /// <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;
            }
        }
Пример #12
0
        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));
            }
        }
Пример #13
0
        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));
            }
        }
Пример #14
0
 private void ProductSelected(object sender, SelectionChangedEventArgs e)
 {
     SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, vm.SelectedProduct.Name);
     vm.ShowDetails();
 }
Пример #15
0
 async void OnStoreItemChange(StoreItem newItem)
 {
     SetPageAnimation(BackgroundAnimation.Fade, 300);
     SharedTransitionNavigationPage.SetTransitionSelectedGroup(this, newItem.Name);
     await Navigation.PushAsync(new Content_DetailedStoreItemPage(newItem));
 }
Пример #16
0
 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));
 }