From c6815f9900f9b6e3a16caf719d3523a50775a8c2 Mon Sep 17 00:00:00 2001 From: Daniel Monettelli Date: Fri, 19 Apr 2024 01:20:44 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20[Code]=20Updated=20FavoritePage.?= =?UTF-8?q?xaml,=20adding=20dynamic=20columns=20in=20CollectionView=20base?= =?UTF-8?q?d=20on=20device=20width?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Meow/ViewModels/FavoriteViewModel.cs | 3 +++ Meow/Views/FavoritePage.xaml | 5 +++-- Meow/Views/FavoritePage.xaml.cs | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Meow/ViewModels/FavoriteViewModel.cs b/Meow/ViewModels/FavoriteViewModel.cs index d773724..6462425 100644 --- a/Meow/ViewModels/FavoriteViewModel.cs +++ b/Meow/ViewModels/FavoriteViewModel.cs @@ -8,6 +8,9 @@ public partial class FavoriteViewModel : BaseViewModel [ObservableProperty] private FavoriteCatResponse selectedFavoriteCat = new(); + [ObservableProperty] + private int columns; + private readonly ICatService _catService; public FavoriteViewModel(ICatService catService) diff --git a/Meow/Views/FavoritePage.xaml b/Meow/Views/FavoritePage.xaml index 13661ff..56cff51 100644 --- a/Meow/Views/FavoritePage.xaml +++ b/Meow/Views/FavoritePage.xaml @@ -10,7 +10,8 @@ xmlns:reusablecomponent="clr-namespace:Meow.ReusableComponents" xmlns:viewModel="clr-namespace:Meow.ViewModels" ios:Page.UseSafeArea="true" - x:DataType="viewModel:FavoriteViewModel"> + x:DataType="viewModel:FavoriteViewModel" + SizeChanged="ContentPage_SizeChanged">