Exemplo n.º 1
0
        private void BrowsePanel_ItemClick(object sender, JustifiedWrapPanel.ItemClickEventArgs e)
        {
            // Clicked a list item from the image wall

            var panel     = (sender as JustifiedWrapPanel);
            var container = panel.ContainerFromItem(e.ClickedItem);

            if (container != null)
            {
                var root  = (container as ContentControl).ContentTemplateRoot;
                var image = (UIElement)(root as FrameworkElement).FindName("PreviewImage");

                // Pre-fall creator has different image loading order
                // unable to share same connected animation code without breaking the UI
                if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 5))
                {
                    ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("PreviewImage", image);
                }
            }

            var post = e.ClickedItem as Post;

            // Navigate to image page
            ImagePage.PostDataStack.Push(panel.ItemsSource as ObservableCollection <Post>);
            this.Frame.Navigate(typeof(ImagePage), post.ToXml(), new SuppressNavigationTransitionInfo());
        }
Exemplo n.º 2
0
        private void Panel_ItemClick(object sender, JustifiedWrapPanel.ItemClickEventArgs e)
        {
            // Navigate to image page
            App.Current.Resources["Gallery"] = this.GalleryViewModel.Gallery;

            var q = new QueryString
            {
                { "link", this.GalleryViewModel.Gallery.Link },
                { "page", $"{this.GalleryViewModel.Gallery.IndexOf(e.ClickedItem as ExGalleryImageListItem)}" }
            };

            PrepareConnectedAnimation((sender as JustifiedWrapPanel).ContainerFromItem(e.ClickedItem) as ContentControl);

            this.Frame.Navigate(typeof(ReadingPage), q.ToString(), new SuppressNavigationTransitionInfo());
        }
Exemplo n.º 3
0
 private void BrowsePanel_ItemClick(object sender, JustifiedWrapPanel.ItemClickEventArgs e)
 {
     (Window.Current.Content as AppShell).AppFrame.Navigate(typeof(GalleryPage), (e.ClickedItem as ExGallery).Link);
 }