예제 #1
0
        /// <summary>Edits the clicked MediaObject inside of the AdaptiveGridView.</summary>
        /// <param name="clickedItem">The clicked item.</param>
        private void EditCommand_ItemClicked(MediaObject clickedItem)
        {
            GetCurrentGrid();

            switch (_storedItem.GetType().Name)
            {
            case "Game":
                _storedItemIndex = CreateObjectsViewModel.Games.IndexOf(clickedItem as Game);
                break;

            case "Image":
                _storedItemIndex = CreateObjectsViewModel.Images.IndexOf(clickedItem as Modell.ChallengeObjects.Image);
                break;

            case "Music":
                _storedItemIndex = CreateObjectsViewModel.Music.IndexOf(clickedItem as Music);
                break;
            }

            ConnectedAnimation animation = Collection.PrepareConnectedAnimation("forwardAnimation", _storedItem, "connectedElement");

            SmokeGrid.Visibility = Visibility.Visible;
            ((SmokeGridChild.Children[0] as Grid).Children[0] as ImageEx).Source = _storedItem.URI;
            (SmokeGridChild.Children[1] as TextBox).Text = _storedItem.Name;
            animation.TryStart(SmokeGrid.Children[0]);
        }
예제 #2
0
        private void SetAnimation(Product product, AdaptiveGridView grid)
        {
            if (product == null || grid == null)
            {
                return;
            }

            grid.PrepareConnectedAnimation("anim", product, product.Image);
            ViewModel.ViewProductDetails(product);
        }
예제 #3
0
        private void SetAnimation(ItemViewModel itemViewModel, AdaptiveGridView grid)
        {
            if (itemViewModel == null || grid == null)
            {
                return;
            }

            grid.PrepareConnectedAnimation(Constants.ConnectedAnimationKey, itemViewModel, "SourceImage");
            itemViewModel.Edit();
            LastSelectedItem = itemViewModel;
        }