Inheritance: System.ComponentModel.Model
        private void OnImageLoaded(ImageSource image, object context)
        {
            PhotoImage photo = (PhotoImage)context;

            photo.Image          = image;
            photo.IsImageLoading = false;

            _loadingImage = false;
            if (image != null)
            {
                _selectedPhoto = photo;
                RaisePropertyChanged("SelectedPhoto");
            }
        }
        private void OnThumbnailLoaded(ImageSource image, object context)
        {
            if (image != null)
            {
                Photo loadedPhoto = (Photo)context;

                PhotoImage photoImage = new PhotoImage(loadedPhoto, image);
                _photos.Add(photoImage);

                if (_photos.Count == 1)
                {
                    IsSearching = false;
                }
            }
        }
        private void OnPhotoGalleryPhotosSearched(string tags, IEnumerable <Photo> photos)
        {
            if (tags != _tags)
            {
                return;
            }

            _photos.Clear();
            _loadingImage = false;
            SelectedPhoto = null;

            foreach (Photo photo in photos)
            {
                ImageLoader.LoadImage(photo.ThumbnailUrl, OnThumbnailLoaded, photo);
            }
        }
Esempio n. 4
0
        private void OnThumbnailLoaded(ImageSource image, object context)
        {
            if (image != null) {
                Photo loadedPhoto = (Photo)context;

                PhotoImage photoImage = new PhotoImage(loadedPhoto, image);
                _photos.Add(photoImage);

                if (_photos.Count == 1) {
                    IsSearching = false;
                }
            }
        }
Esempio n. 5
0
        private void OnPhotoGalleryPhotosSearched(string tags, IEnumerable<Photo> photos)
        {
            if (tags != _tags) {
                return;
            }

            _photos.Clear();
            _loadingImage = false;
            SelectedPhoto = null;

            foreach (Photo photo in photos) {
                ImageLoader.LoadImage(photo.ThumbnailUri, OnThumbnailLoaded, photo);
            }
        }
Esempio n. 6
0
        private void OnImageLoaded(ImageSource image, object context)
        {
            PhotoImage photo = (PhotoImage)context;
            photo.Image = image;
            photo.IsImageLoading = false;

            _loadingImage = false;
            if (image != null) {
                _selectedPhoto = photo;
                RaisePropertyChanged("SelectedPhoto");
            }
        }