private void CollectionControl_CellSelected_1(object sender, CellSelectedEventArgs e)
 {
     if (pivot.SelectedIndex == 0)
     {
         if (e.Type == CellType.Album)
         {
             var pModel = new PhotosViewModel();
             pModel.Initialize(e.SelectedItem.Data as PictureAlbum, cts.Token);
             ViewModels[0] = pModel;
             ((pivot.SelectedItem as PivotItem).Content as CollectionControl).Initialize(ViewModels[0]);
             CreateCompletedAppBar();
         }
     }
 }
Esempio n. 2
0
        void photosCollectionControl_CellSelected(object myObject, CellSelectedEventArgs myArgs)
        {
            if (selecting)
            {
                switch (myArgs.Type)
                {
                    case CellType.Album:

                        break;
                    case CellType.Photo:
                        break;
                    default:
                        break;
                }
                ListBox l = new ListBox();

            }
            switch (myArgs.Type)
            {
                case CellType.Album:
                    PhotosCollectionViewModel = new PhotosViewModel();
                    PhotosCollectionViewModel.Initialize(myArgs.SelectedItem.Data as PictureAlbum,cts.Token, false );
                    photosCollectionControl.Initialize(PhotosCollectionViewModel);
                    deep++;
                    break;

                case CellType.Photo:
                    SelectedImage = (myArgs.SelectedItem.Data as Picture);
                   NavigationService.Navigate(new Uri("/PhotoViewerPage.xaml", UriKind.Relative));
                   break;

                default:
                    break;
            }
        }