public static List <GroupedCategoryPreview> GetTopCategories() { var mockPhotoThumbnail = new PhotoThumbnail { ImageUrl = mockImageUrl }; var thumbnailList = new List <PhotoThumbnail>(); for (var i = 0; i < 6; i++) { thumbnailList.Add(mockPhotoThumbnail); } var mockCategory = new CategoryPreview { Name = "", PhotoThumbnails = thumbnailList }; var list = new List <GroupedCategoryPreview>(); for (var i = 0; i < 8; i++) { list.Add(new GroupedCategoryPreview(thumbnailList, "", "", mockCategory)); } return(list); }
/// <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> /// Converts from <see cref="CategoryPreview" /> to <see cref="Category" />. /// </summary> /// <param name="categoryPreview">The category preview object.</param> /// <returns>The category.</returns> public static Category ToCategory(this CategoryPreview categoryPreview) { return(new Category { Id = categoryPreview.Id, Name = categoryPreview.Name }); }
/// <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> /// Converts the given category preview data model to a contract. /// </summary> /// <param name="category">The category preview data model.</param> /// <returns>The category preview contract.</returns> public static CategoryPreviewContract ToDataContract(this CategoryPreview category) { return(new CategoryPreviewContract { Id = category.Id, Name = category.Name, PhotoThumbnails = category.PhotoThumbnails.Select(t => t.ToDataContract()).ToList() }); }
public void Init(CategoryPreview categoryPreview) { categoryId = categoryPreview.Id; Title = categoryPreview.Name; IsLoaded = false; // Mock data Photos.ReplaceRange(MockData.GetHeroImages()); }
private void OnCategorySelected(CategoryPreview categoryPreview) { _telemetryClient.TrackEvent(TelemetryEvents.CategoryPreviewSelected, new Dictionary <string, string> { { TelemetryProperties.CategoryName, categoryPreview.Name } }); SelectedCategoryPreview = categoryPreview; _navigationFacade.NavigateToPhotoStream(categoryPreview); }
/// <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> /// Creates a new instance. /// </summary> /// <param name="category">The category to show data for.</param> public StreamViewModelArgs(CategoryPreview category) { Category = category; }
/// <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; }
public CategoryThumbnailBundle(CategoryPreview preview, PhotoThumbnail thumbnail) { this.Preview = preview; this.Thumbnail = thumbnail; }
private void OnCategorySelected(CategoryPreview categoryPreview) { SelectedCategoryPreview = categoryPreview; _navigationFacade.NavigateToPhotoStream(categoryPreview); }
/// <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 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 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 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 target category for the photo.</param> public CameraViewModelArgs(CategoryPreview category) { Category = category; }
/// <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; }
public GroupedCategoryPreview(IEnumerable <PhotoThumbnail> items, string name, string shortName, CategoryPreview categoryPreview) : base(items, name, shortName) { this.CategoryPreview = categoryPreview; }