private async void Source__LoadedAsync(object sender, RoutedEventArgs e) { var Animationkey = "other"; //ContactsItem item = GetPersistedItem(); // Get persisted item if (item_ != null) { Source_.ScrollIntoView(item_); switch (FileType_check(item_.StorageFile_)) { case "Music": Animationkey = "backAnimationmc"; break; case "Picture": Animationkey = "backAnimationMedia"; break; case "Video": Animationkey = "backAnimationMedia"; break; default: Animationkey = "other"; break; } ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation(Animationkey); ConnectedAnimation animation_info = ConnectedAnimationService.GetForCurrentView().GetAnimation(Animationkey + "_info"); if (animation != null) { await Source_.TryStartConnectedAnimationAsync( animation, item_, "CoverIMG"); } if (animation_info != null) { await Source_.TryStartConnectedAnimationAsync( animation_info, item_, "infoStackPanel"); } } }
private void Source__ItemClick(object sender, ItemClickEventArgs e) { // ItemAccess.NeedNav = "All_New"; item_ = (Items)e.ClickedItem; var type_in = ItemAccess.FileType_check(item_.StorageFile_); switch (type_in) { case "Picture": { var contatiner = Source_.ContainerFromItem(e.ClickedItem) as GridViewItem; if (contatiner != null) { var temp = contatiner.Content as Items; Source_.PrepareConnectedAnimation("forwardAnimation", temp, "CoverIMG"); // MUSIC.PrepareConnectedAnimation //("forwardAnimation", temp, "MusicSourceImg"); } Frame frame = Window.Current.Content as Frame; frame.Navigate(typeof(Pages.Graphics), item_, new SuppressNavigationTransitionInfo()); break; } case "Video": { var contatiner = Source_.ContainerFromItem(e.ClickedItem) as GridViewItem; if (contatiner != null) { var temp = contatiner.Content as Items; Source_.PrepareConnectedAnimation("forwardAnimation", temp, "CoverIMG"); // MUSIC.PrepareConnectedAnimation //("forwardAnimation", temp, "MusicSourceImg"); } Frame frame = Window.Current.Content as Frame; frame.Navigate(typeof(Pages.MediaPage), item_, new SuppressNavigationTransitionInfo()); break; } case "Music": { var contatiner = Source_.ContainerFromItem(e.ClickedItem) as GridViewItem; if (contatiner != null) { var temp = contatiner.Content as Items; Source_.PrepareConnectedAnimation("forwardAnimation_mc", temp, "CoverIMG"); Source_.PrepareConnectedAnimation("forwardAnimation_mcinfo", temp, "infoStackPanel"); // MUSIC.PrepareConnectedAnimation //("forwardAnimation", temp, "MusicSourceImg"); } Frame frame = Window.Current.Content as Frame; frame.Navigate(typeof(Pages.AudioPage), item_, new SuppressNavigationTransitionInfo()); //Frame.Navigate(typeof(Pages.AudioPage), item_in, new SuppressNavigationTransitionInfo()); break; } default: { Frame frame = Window.Current.Content as Frame; frame.Navigate(typeof(Pages.ItemPage), item_, new SuppressNavigationTransitionInfo()); break; } } }