public GalleryItemViewModel(GalleryItem aModel, Action<GalleryItem> aOnClick)
 {
     _model = aModel;
     _onClick = aOnClick;
     OnClickCommand = new RelayCommand(wasClicked);
     _source = ImageSourceFromFile(_model.MediaPath);
 }
Ejemplo n.º 2
0
 private void GalleryItemWasClicked(GalleryItem aItem)
 {
     if (aItem != null)
     {
         log.Info("GalleryItemClicked: " + aItem.Title);
         if (aItem.Type == GalleryItem.GalleryItemType.GalleryMediaTypeFolder)
         {
             GalleryItemManager.Default.GoInFolder(aItem);
             _currentPage = -1;
             CurrentPage = 0;
         }
         else
         {
             GalleryDetailViewModel galleryDetailView = ViewModelLocator.Locator().GalleryDetailViewModel;
             galleryDetailView.Item = aItem;
             MessengerInstance.Send<ApplicationViewModel.ChangePageMessage>(new ApplicationViewModel.ChangePageMessage(galleryDetailView));
         }
     }
 }
 public void GoInFolder(GalleryItem aItem)
 {
     AddFolder(aItem.ParentFolderPath + "/" + aItem.Title);
 }