private void OnPhotoInfoUpdated(object sender, PhotoInfoUpdatedEventArgs e)
        {
            Dispatcher.BeginInvoke(() => {
                if (e.PhotoId != PhotoSource.ResourceId)
                    return;

                // Favourite icon
                if (PhotoSource.IsFavourite)
                    FavIconView.Visibility = Visibility.Visible;
                else
                    FavIconView.Visibility = Visibility.Collapsed;

            });
        }
        private void OnPhotoInfoReturned(object sender, GetPhotoInfoEventArgs e)
        {
            JObject json = JObject.Parse(e.Response);
            Photo photo = PhotoFactory.PhotoWithPhotoInfoJObject((JObject)json["photo"]);

            // Should add this photo to stream?
            if (e.IsUploadedPhoto)
            {
                // Dispatch event
                UploadedPhotoInfoReturnedEventArgs evt = new UploadedPhotoInfoReturnedEventArgs();
                evt.PhotoId = e.PhotoId;
                UploadedPhotoInfoReturned.DispatchEvent(this, evt);
            }

            var updateEvt = new PhotoInfoUpdatedEventArgs();
            updateEvt.PhotoId = photo.ResourceId;
            PhotoInfoUpdated.DispatchEvent(this, updateEvt);
        }
        private void OnPhotoInfoUpdated(object sender, PhotoInfoUpdatedEventArgs e)
        {
            Dispatcher.BeginInvoke(() => {
                if (e.PhotoId != PhotoSource.ResourceId)
                    return;

                if (PhotoSource.IsFavourite)
                {
                    RemoveFavourite();
                }
                else
                {
                    AddToFavourite();
                }
            });
        }