/// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="category">The category to show data for.</param>
 /// <param name="photoThumbnail">The photo thumbnail that is used for
 /// determining the scroll position of the photo stream.</param>
 public StreamViewModelThumbnailArgs(CategoryPreview category, PhotoThumbnail photoThumbnail)
 {
     Category = category;
     PhotoThumbnail = photoThumbnail;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PhotoDetailsViewModelArgs" /> class.
 /// </summary>
 /// <param name="category">The category.</param>
 /// <param name="photo">The photo.</param>
 public PhotoDetailsViewModelArgs(CategoryPreview category, Photo photo)
 {
     Category = category;
     Photo = photo;
 }
 private void OnCategorySelected(CategoryPreview categoryPreview)
 {
     SelectedCategoryPreview = categoryPreview;
     _navigationFacade.NavigateToPhotoStream(categoryPreview);
 }
 /// <summary>
 /// Navigates to the upload view.
 /// </summary>
 /// <param name="image">The image to upload.</param>
 /// <param name="category">The category to upload the image into.</param>
 public void NavigateToUploadView(WriteableBitmap image, CategoryPreview category)
 {
     Navigate(typeof(UploadViewModel), new UploadViewModelArgs
     {
         Category = category,
         Image = image
     }, false);
 }
        /// <summary>
        /// Creates a new category.
        /// </summary>
        /// <param name="categoryName">The category name.</param>
        /// <returns>The category.</returns>
        public async Task<Category> CreateCategory(string categoryName)
        {
            await SimulateWaitAndError();

            var categoryPreview = new CategoryPreview
            {
                Id = Guid.NewGuid().ToString(),
                Name = categoryName,
                PhotoThumbnails = new List<PhotoThumbnail>()
            };

            TopCategories.Add(categoryPreview);

            return categoryPreview.ToCategory();
        }
 /// <summary>
 /// Navigates to the photo stream view.
 /// </summary>
 /// <param name="category">The category preview instance.</param>
 public void NavigateToPhotoStream(CategoryPreview category)
 {
     Navigate(typeof(StreamViewModel), new StreamViewModelArgs(category));
 }
 /// <summary>
 /// Navigates to the photo stream view.
 /// </summary>
 /// <param name="categoryPreview">The category preview instance.</param>
 /// <param name="photoThumbnail">
 /// The photo thumbnail that will determine the scroll position.
 /// </param>
 public void NavigateToPhotoStream(CategoryPreview categoryPreview, PhotoThumbnail photoThumbnail)
 {
     Navigate(typeof(StreamViewModel), new StreamViewModelThumbnailArgs(categoryPreview, photoThumbnail));
 }
 /// <summary>
 /// Navigates to the photo details view.
 /// </summary>
 /// <param name="category">The category.</param>
 /// <param name="photo">The photo.</param>
 public void NavigateToPhotoDetailsView(CategoryPreview category, Photo photo)
 {
     Navigate(typeof(PhotoDetailsViewModel), new PhotoDetailsViewModelArgs(category, photo));
 }
 /// <summary>
 /// Navigates to the crop view.
 /// </summary>
 /// <param name="file">The photo to crop.</param>
 /// <param name="category">The selected category for the photo.</param>
 public void NavigateToCropView(StorageFile file, CategoryPreview category)
 {
     Navigate(typeof(CropViewModel), new CropViewModelArgs
     {
         Category = category,
         StorageFile = file
     }, false);
 }
 /// <summary>
 /// Navigates to the camera view.
 /// </summary>
 /// <param name="category">The category.</param>
 public void NavigateToCameraView(CategoryPreview category)
 {
     Navigate(typeof(CameraViewModel), new CameraViewModelArgs(category));
 }
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="category">The category to show data for.</param>
 public StreamViewModelArgs(CategoryPreview category)
 {
     Category = category;
 }
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="category">The target category for the photo.</param>
 public CameraViewModelArgs(CategoryPreview category)
 {
     Category = category;
 }