示例#1
0
 public void OnCellSelected(object sender, CellSelectedEventArgs args)
 {
     if (args.Area.IsWithin(Column, Row, Column, Row))
     {
         args.AreaAvailable = IsCellAvailable(args.Model);
     }
 }
        /// <summary>
        /// handle click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MenuFabCellSelected(object sender, CellSelectedEventArgs e)
        {
            //get item click index
            var selectedCellIndex = e.Index;

            Element.RaiseSelectIndexChanged(selectedCellIndex);

            //close fab menu
            _menuFab.Close();
        }
示例#3
0
 public void OnOccupy(object sender, CellSelectedEventArgs args)
 {
     if (args.Area.IsWithin(Column, Row, Column, Row))
     {
         Occupied = true;
         if (args.Model.IsConnecting)
         {
             ContainsConnectingGate = true;
         }
     }
 }
示例#4
0
 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();
         }
     }
 }
示例#5
0
 public void OnHighlight(object sender, CellSelectedEventArgs args)
 {
     if (args.Area.IsWithin(Column, Row, Column, Row))
     {
         if (!IsCellAvailable(args.Model))
         {
             Background = Brushes.LightCoral;
         }
         else
         {
             Background = Brushes.LightBlue;
         }
     }
 }
示例#6
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;
            }
        }
示例#7
0
 private void CollectionControl_CellSelected_2(object myObject, CellSelectedEventArgs myArgs)
 {
 }
        private void CollectionControl_CellSelected_2(object myObject, CellSelectedEventArgs myArgs)
        {

        }
 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();
         }
     }
 }
示例#10
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;
            }
        }