Example #1
0
        private async void PopularStoresCollection_OnLoaded(object sender, RoutedEventArgs e)
        {
            if (_selectedStore == null)
            {
                return;
            }
            PopularStoresCollection.ScrollIntoView(_selectedStore, ScrollIntoViewAlignment.Default);
            // undo focus
            PopularStoresCollection.SelectedItem = null;
            PopularStoresCollection.UpdateLayout();
            var storeImgBackConnectedAnimation =
                ConnectedAnimationService.GetForCurrentView().GetAnimation("StoreImgBackConnectedAnimation");

            if (storeImgBackConnectedAnimation != null)
            {
                await PopularStoresCollection.TryStartConnectedAnimationAsync(storeImgBackConnectedAnimation,
                                                                              _selectedStore,
                                                                              "StoreImg");
            }

            var storeNameBackConnectedAnimation = ConnectedAnimationService.GetForCurrentView()
                                                  .GetAnimation("StoreNameBackConnectedAnimation");

            if (storeNameBackConnectedAnimation != null)
            {
                await PopularStoresCollection.TryStartConnectedAnimationAsync(storeNameBackConnectedAnimation,
                                                                              _selectedStore, "StoreName");
            }
        }
Example #2
0
 private void StoreDetails(object sender, ItemClickEventArgs e)
 {
     if (!(PopularStoresCollection.ContainerFromItem(e.ClickedItem) is ListViewItem container))
     {
         return;
     }
     _selectedStore = container.Content as Store;
     PopularStoresCollection.PrepareConnectedAnimation("StoreImgForwardConnectedAnimation", _selectedStore,
                                                       "StoreImg");
     PopularStoresCollection.PrepareConnectedAnimation("StoreNameForwardConnectedAnimation", _selectedStore,
                                                       "StoreName");
     if (_selectedStore != null)
     {
         Frame.Navigate(typeof(StoreDetails), _selectedStore);
     }
 }