상속: ISemanticZoomViewChangedEventArgs
예제 #1
0
        private void SemanticZoom_OnViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            if (e.IsSourceZoomedInView)
                return;

            this.itemGridView.Opacity = 0;
        }
예제 #2
0
        private void SemanticZoom_OnViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            if (e.IsSourceZoomedInView)
                return;

            try
            {
                var selectedGroup = e.SourceItem.Item as string;
                if (selectedGroup == null)
                    return;

                itemGridView.ScrollIntoView(selectedGroup, ScrollIntoViewAlignment.Leading);
            }
            finally
            {
                this.itemGridView.Opacity = 1;
            }
        }
        private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            if (SemanticZoom.IsZoomedInViewActive)
            {
                SystemNavigationManager.GetForCurrentView().BackRequested += Zoom_BackRequested;
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
                var list = AlbumSongsGroup.CreateGroup(e.SourceItem.Item as ArtistsKeyGroup<AlbumItem>, true);
                if (list == null)
                    SemanticZoom.IsZoomedInViewActive = false;
                ArtistDetailsSource.Source = list;
                ArtistDetailedView.ItemsSource = ArtistDetailsSource.View;
                SemanticZoom.CanChangeViews = false;
                var ArtistArtworkGroups = ArtistDetailedView.FindChildControl<RelativePanel>("ArtistArtworkGroups") as RelativePanel;
                var ArtistArtworkGroup0 = ArtistDetailedView.FindChildControl<RelativePanel>("ArtistArtworkGroup0") as RelativePanel;
                var ArtistArtworkGroup1 = ArtistDetailedView.FindChildControl<RelativePanel>("ArtistArtworkGroup1") as RelativePanel;
                var ArtistArtworkGroup2 = ArtistDetailedView.FindChildControl<RelativePanel>("ArtistArtworkGroup2") as RelativePanel;

                var ArtistName = ArtistDetailedView.FindChildControl<TextBlock>("ArtistName") as TextBlock;
                var ArtistDetails = ArtistDetailedView.FindChildControl<TextBlock>("ArtistDetails") as TextBlock;

                var artistsconverter = new ArtistsConverter();
                var artistdetailsconverter = new ArtistDetailsConverter();
                var artistdetails = artistdetailsconverter.Convert(list, null, null, null);
                var artists = artistsconverter.Convert(list[0].AlbumArtists, null, true, null);
                ArtistDetails.Text = (string)artistdetails;
                ArtistName.Text = (string)artists;
                var imagelist = ArtistArtworkGroups.GetImages();
                foreach (var image in imagelist)
                {
                    image.Source = null;
                }
                

                if (list.Count < 5)
                {
                    ArtistArtworkGroup0.Height = 400;
                    ArtistArtworkGroup1.Height = 400;
                    ArtistArtworkGroup2.Height = 400;
                }
                else if (list.Count < 9)
                {
                    ArtistArtworkGroup0.Height = 320;
                    ArtistArtworkGroup1.Height = 320;
                    ArtistArtworkGroup2.Height = 320;
                }
                else
                {
                    ArtistArtworkGroup0.Height = 240;
                    ArtistArtworkGroup1.Height = 240;
                    ArtistArtworkGroup2.Height = 240;
                }
                int i = 0;
                var placeholder = new BitmapImage();
                foreach (var image in imagelist)
                {
                    if (list.Count < i + 1)
                        image.Source = placeholder;
                    else
                        image.Source = new BitmapImage(new Uri(list[i].AlbumArtWork));
                    i++;
                }
            }
        }
예제 #4
0
 private void AlbumsByArtistSemanticZoom_OnViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     try
     {
         Locator.MusicLibraryVM.ExecuteSemanticZoom();
     }
     catch { }
 }
 private void sz_FavoritePosts_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     e.DestinationItem.Item = e.SourceItem.Item;
 }
 private void SemanticZoom_ViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     var vm = this.DataContext as EntryGroupListViewModel;
     if (e.IsSourceZoomedInView)
     {
         vm.IsAdVisible = false;
     }
     else
     {
         vm.IsAdVisible = true;
     }
 }
예제 #7
0
 private void sz_Category_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (!e.IsSourceZoomedInView)
     {
         e.DestinationItem.Item = e.SourceItem.Item;
     }
 }
        /// <summary>
        /// Event handler for ViewChangeStarted event for SemanticZoom
        /// </summary>
        /// <param name="e">SemanticZoomViewChangedEventArgs</param>
        private void EventHandlerViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            PdfPageViewModel sourceItem = e.SourceItem.Item as PdfPageViewModel;
            if (sourceItem != null)
            {
                int pageIndex = (int)(sourceItem.PageIndex);
                if (this.pdfDataSourceZoomedInView.Count > pageIndex)
                {
                    // Transitioning from Zooomed Out View to Zoomed In View
                    if (this.semanticZoom.IsZoomedInViewActive)
                    {
                        // Getting destination item from Zoomed-In-View
                        PdfPageViewModel destinationItem = (PdfPageViewModel)this.pdfDataSourceZoomedInView[pageIndex];

                        if (destinationItem != null)
                        {
                            e.DestinationItem.Item = destinationItem;
                        }
                    }
                    // Transitioning from Zooomed In View to Zoomed Out View
                    else
                    {
                        // Getting destination item from Zoomed-In-View
                        PdfPageViewModel destinationItem = (PdfPageViewModel)this.pdfDataSourceZoomedOutView[pageIndex];

                        if (destinationItem != null)
                        {
                            e.DestinationItem.Item = destinationItem;
                        }
                    }
                }
            }
        }
예제 #9
0
        // The following are for grid view

        /// <summary>
        /// Event handler for view switching
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void semanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            if (e.IsSourceZoomedInView)
            {
                // Switching to zoom out view (Grid View)
                this.GridViewBtn.IsChecked = true;
                DisableInputTypeBtn();
                this.ZoomBtn.IsEnabled = false;
                // Pause zoom in view rendering 
                this.renderPagesQueue.Clear();
                // Resume zoom out view rendering
                this.pageThumbnails.ResumeRendering();
                // Initialize thumbnails
                if (!this.pageThumbnails.IsInitialized)
                    await this.pageThumbnails.InitializeBlankPages();
                // Sync current visible page between views
                int pageIndex = this.VisiblePageRange.first - 1;
                this.zoomOutGrid.ScrollIntoView(this.pageThumbnails[pageIndex]);
                // Clear previous selected index
                this.pageThumbnails.SelectedIndex = -1;
            }
            else
            {
                // Switching to zoom in view
                this.GridViewBtn.IsChecked = false;
                if (this.imagePanel.Orientation == Orientation.Vertical)
                    this.VerticalViewBtn.IsChecked = true;
                else this.HorizontalViewBtn.IsChecked = true;
                EnableInputTypeBtn();
                this.ZoomBtn.IsEnabled = true;
                // Pause zoom out view rendering
                this.pageThumbnails.PauseRendering();
                // Resume zoom in view rendering
                RefreshViewer();
                // Sync current visible page between views
                int pageIndex = this.pageThumbnails.SelectedIndex;
                if (pageIndex >= 0)
                    ScrollToPage(pageIndex);
            }
        }
예제 #10
0
 private void viewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (e.SourceItem.Item != null)
     {
         Answer_ZoomedInListView.SelectedItem = e.SourceItem.Item;
         Answer_ZoomedInListView.ScrollIntoView(Answer_ZoomedInListView.SelectedItem);
         e.SourceItem.Item = e.DestinationItem.Item;
     }
 }
예제 #11
0
 private void sz_News_ViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (!e.IsSourceZoomedInView & isZoomOutTapped)
     {
         News news = e.DestinationItem.Item as News;
         isZoomOutTapped = false;
         this.Frame.Navigate(typeof(NewsReadingPage), news);
         sz_News.ToggleActiveView();
     }
 }
예제 #12
0
 private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (!e.IsSourceZoomedInView)
     {
         var semantic = sender as SemanticZoom;
         var view1 = semantic.ZoomedInView as GridView;
         var view2 = semantic.ZoomedOutView as GridView;
         var index = view2.Items.IndexOf(e.SourceItem.Item);
         e.DestinationItem.Item = view1.Items[index];
     }
 }
 private void Semantic_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (groupedItemsViewSource.View != null)
         (Semantic.ZoomedOutView as ListViewBase).ItemsSource = groupedItemsViewSource.View.CollectionGroups;
 }
예제 #14
0
 private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     CatsZoomeOutListView.ItemsSource = CatsCvs.View.CollectionGroups;
 }
예제 #15
0
 private void narrowSeZo_ViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e) {
     switchViews.Content = narrowSeZo.IsZoomedInViewActive ? "\uE71F" : "\uE8A3";
 }
예제 #16
0
 private void SemanticZoom_OnViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     AlbumsZoomedOutView.ItemsSource = GroupAlbums.View.CollectionGroups;
 }
 void semanticzoomDate_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     SwitchState();
 }
예제 #18
0
 private void SemanticZoom_OnViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
 {
 }
 /// <summary>
 /// Collapses all unncessary elements when the user is in semantic zoom out mode
 /// This allows the alphabet grid to be displayed in a bigger space.
 /// </summary>
 private void UpdateCollapseState(object sender, SemanticZoomViewChangedEventArgs e)
 {
     contactsVM.MaximizeSemanticZoomOut(ContactGroupView.IsZoomedInViewActive);
 }
예제 #20
0
        private void sz_Category_ViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
        {

        }
 private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (e.IsSourceZoomedInView == false) e.DestinationItem.Item = e.SourceItem.Item;
 }
 private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (e.IsSourceZoomedInView)
     {
         MainGridView.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
     }
     else
     {
         MainGridView.Visibility = Windows.UI.Xaml.Visibility.Visible;
     }
 }
예제 #23
0
        private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
        {
            if (e.SourceItem.Item == null) return;

            e.DestinationItem = new SemanticZoomLocation { Item = e.SourceItem.Item };
        }
예제 #24
0
 private void SemanticZoom_OnViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     DrapsZoomeOutListView.ItemsSource = DrapsCvs.View.CollectionGroups;
 }
 private void semanticZoom_ViewChangeStarted_1(object sender, SemanticZoomViewChangedEventArgs e)
 {
 }
예제 #26
0
 private void sz_FavoritePosts_ViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (!e.IsSourceZoomedInView & isZoomOutTapped)
     {
         Post post = e.DestinationItem.Item as Post;
         isZoomOutTapped = false;
         this.Frame.Navigate(typeof(PostReadingPage), post);
         sz_FavoritePosts.ToggleActiveView();
     }
 }
예제 #27
0
 private void semanticZoom_ViewChangeCompleted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     this.AppBarButtonSetup();
 }
예제 #28
0
 private void SemanticZoomChanging(object sender, SemanticZoomViewChangedEventArgs e)
 {
     UpdateActionBar(e.IsSourceZoomedInView);
 }
 private void SemanticZoom_ViewChangeStarted(object sender, SemanticZoomViewChangedEventArgs e)
 {
     if (e.SourceItem == null || e.SourceItem.Item == null) return;
     if (e.SourceItem.Item.GetType() == typeof (HeaderItem))
     {
         HeaderItem headerItem = (HeaderItem) e.SourceItem.Item;
         var group = _dataLetter.First(d => ((char) d.Key) == headerItem.HeaderName);
         if (group != null)
         {
             e.DestinationItem = new SemanticZoomLocation {Item = group};
         }
     }
 }