From bfac3792f9dcb1aa7b34dad35795b15252400ede Mon Sep 17 00:00:00 2001 From: Naveenkumar S Date: Mon, 24 Mar 2025 13:41:15 +0530 Subject: [PATCH 1/2] Updated demo UI --- PhotoGallery/AlbumCollectionPage.xaml | 8 +++--- PhotoGallery/AlbumCollectionPage.xaml.cs | 8 ++++-- PhotoGallery/ImagePage.xaml | 26 +++++++++---------- PhotoGallery/MainPage.xaml | 32 +++++++++++------------- PhotoGallery/MainPage.xaml.cs | 8 ++++-- 5 files changed, 44 insertions(+), 38 deletions(-) diff --git a/PhotoGallery/AlbumCollectionPage.xaml b/PhotoGallery/AlbumCollectionPage.xaml index bb5ead8..eba5b61 100644 --- a/PhotoGallery/AlbumCollectionPage.xaml +++ b/PhotoGallery/AlbumCollectionPage.xaml @@ -5,14 +5,14 @@ x:Class="PhotoGallery.AlbumCollectionPage" Title="{Binding AlbumName}"> - + - + - + diff --git a/PhotoGallery/AlbumCollectionPage.xaml.cs b/PhotoGallery/AlbumCollectionPage.xaml.cs index d1d0e36..0d84260 100644 --- a/PhotoGallery/AlbumCollectionPage.xaml.cs +++ b/PhotoGallery/AlbumCollectionPage.xaml.cs @@ -24,13 +24,17 @@ public AlbumCollectionPage(GalleryViewModel viewModel) { return "Today"; } + else if (item.DateTime.Date == DateTime.Now.Date.AddDays(-1)) + { + return "Yesterday"; + } else if (item.DateTime.Year == DateTime.Now.Year) { - return item.DateTime.ToString("MMM dd", CultureInfo.InvariantCulture); + return item.DateTime.ToString("ddd, dd MMM", CultureInfo.InvariantCulture); } else { - return item.DateTime.ToString("MMM dd yyyy", CultureInfo.InvariantCulture); + return item.DateTime.ToString("ddd, dd MMM, yyyy", CultureInfo.InvariantCulture); } } else diff --git a/PhotoGallery/ImagePage.xaml b/PhotoGallery/ImagePage.xaml index 88120a3..58bf518 100644 --- a/PhotoGallery/ImagePage.xaml +++ b/PhotoGallery/ImagePage.xaml @@ -14,11 +14,11 @@ - + - + @@ -33,38 +33,38 @@ - + - + - - + - + - - + @@ -72,7 +72,7 @@ diff --git a/PhotoGallery/MainPage.xaml b/PhotoGallery/MainPage.xaml index bcb8cef..df0a5e9 100644 --- a/PhotoGallery/MainPage.xaml +++ b/PhotoGallery/MainPage.xaml @@ -39,15 +39,15 @@ Color="{Binding Source={x:Reference photosTab},Path=TextColor}" FontFamily="PhotoGallery"/> - + - + - + @@ -60,17 +60,17 @@ FontFamily="PhotoGallery"/> - + - + - - @@ -83,15 +83,13 @@ Color="{Binding Source={x:Reference favoritesTab},Path=TextColor}" FontFamily="PhotoGallery"/> - - - - + - - diff --git a/PhotoGallery/MainPage.xaml.cs b/PhotoGallery/MainPage.xaml.cs index 676c900..79b62c4 100644 --- a/PhotoGallery/MainPage.xaml.cs +++ b/PhotoGallery/MainPage.xaml.cs @@ -21,13 +21,17 @@ public MainPage() { return "Today"; } + else if (item.DateTime.Date == DateTime.Now.Date.AddDays(-1)) + { + return "Yesterday"; + } else if (item.DateTime.Year == DateTime.Now.Year) { - return item.DateTime.ToString("MMM dd", CultureInfo.InvariantCulture); + return item.DateTime.ToString("ddd, dd MMM", CultureInfo.InvariantCulture); } else { - return item.DateTime.ToString("MMM dd yyyy", CultureInfo.InvariantCulture); + return item.DateTime.ToString("ddd, dd MMM, yyyy", CultureInfo.InvariantCulture); } } else From 98b46e18f18ce048024f952101d7b5863f47cb72 Mon Sep 17 00:00:00 2001 From: Naveenkumar S Date: Mon, 24 Mar 2025 15:21:54 +0530 Subject: [PATCH 2/2] Added new images --- PhotoGallery/ViewModel/ViewModel.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/PhotoGallery/ViewModel/ViewModel.cs b/PhotoGallery/ViewModel/ViewModel.cs index f113390..1dec009 100644 --- a/PhotoGallery/ViewModel/ViewModel.cs +++ b/PhotoGallery/ViewModel/ViewModel.cs @@ -42,8 +42,17 @@ private void GeneratePhotos() new ImageInfo() { ImageName = "place_8", Image= "place_8.jpg",Size= "2MB",DateTime= dateTime.AddDays(-40).AddHours(14)}, new ImageInfo() { ImageName = "monitors", Image= "monitors.png",Size= "2MB",DateTime= dateTime.AddDays(-45).AddHours(14)}, new ImageInfo() { ImageName = "place_9", Image= "place_9.jpg",Size= "2MB",DateTime= dateTime.AddDays(-50).AddHours(13)}, - new ImageInfo() { ImageName = "bird10", Image= "bird10.jpg",Size= "2MB",DateTime= dateTime.AddMonths(-2).AddHours(16)}, - new ImageInfo() { ImageName = "place_10", Image= "place_10.jpg",Size= "2MB",DateTime= dateTime.AddYears(-1).AddHours(16)}, + new ImageInfo() { ImageName = "bird10", Image= "bird10.png",Size= "2MB",DateTime= dateTime.AddMonths(-2).AddHours(16)}, + new ImageInfo() { ImageName = "place_10", Image= "place_10.jpg",Size= "2MB",DateTime= dateTime.AddMonths(-3).AddHours(6)}, + new ImageInfo() { ImageName = "place_11", Image= "place_11.jpg",Size= "2MB",DateTime= dateTime.AddMonths(-4).AddHours(12)}, + new ImageInfo() { ImageName = "bird11", Image= "bird11.png",Size= "2MB",DateTime= dateTime.AddMonths(-2).AddDays(1).AddHours(16)}, + new ImageInfo() { ImageName = "bird12", Image= "bird12.png",Size= "2MB",DateTime= dateTime.AddMonths(-2).AddHours(13)}, + new ImageInfo() { ImageName = "place_12", Image= "place_12.jpg",Size= "2MB",DateTime= dateTime.AddMonths(-3).AddHours(14)}, + new ImageInfo() { ImageName = "place_13", Image= "place_13.jpg",Size= "2MB",DateTime= dateTime.AddMonths(-3).AddDays(1).AddHours(12)}, + new ImageInfo() { ImageName = "bird13", Image= "bird13.png",Size= "2MB",DateTime= dateTime.AddMonths(-6).AddHours(16)}, + new ImageInfo() { ImageName = "bird14", Image= "bird14.png",Size= "2MB",DateTime= dateTime.AddMonths(-6).AddDays(1).AddHours(10)}, + new ImageInfo() { ImageName = "place_14", Image= "place_14.jpg",Size= "2MB",DateTime= dateTime.AddMonths(-7).AddHours(16)}, + new ImageInfo() { ImageName = "place_15", Image= "place_15.jpg",Size= "2MB",DateTime= dateTime.AddYears(-1).AddHours(13)}, }; Countries = new ObservableCollection()