From e9750e0102888fd84515d7c527b6e52597232c0f Mon Sep 17 00:00:00 2001 From: Remi LAVERGNE Date: Mon, 22 May 2023 11:05:19 +0200 Subject: [PATCH 1/2] DataBiding collectionview --- GameAtlas/GameAtlas/Stub/Stub.cs | 4 ++-- GameAtlas/GameAtlas/Views/PageParcourir.xaml | 23 +------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/GameAtlas/GameAtlas/Stub/Stub.cs b/GameAtlas/GameAtlas/Stub/Stub.cs index 475f47a..1e4a1b1 100644 --- a/GameAtlas/GameAtlas/Stub/Stub.cs +++ b/GameAtlas/GameAtlas/Stub/Stub.cs @@ -14,8 +14,8 @@ namespace GameAtlas.Stub List ListUsers = new List(); List ListJeu = new List(); Utilisateur user1 = new Utilisateur("test@gmail.com", "test", "Test1234"); - Jeu TheLastOfUs = new Jeu("The last of Us Part 1", 5, 487, "Ps5", "Aventure", "cover_lastofus1.png"); - Jeu ForzaHorizon = new Jeu("Forza Horizon 5", 4, 420, "Ps4", "Course", "cover_forzahorizon5.png"); + Jeu TheLastOfUs = new Jeu("The last of Us Part 1", 5, 487, "Ps5", "Aventure", "https://cdn1.epicgames.com/offer/b7b42e2078524ab386a8b2a9856ef557/EGS_SifuDeluxeEditionUpgradeBundle_Sloclap_Bundles_S1_2560x1440-43bae7aa2089289442238bd1e2b55655"); + Jeu ForzaHorizon = new Jeu("Forza Horizon 5", 4, 420, "Ps4", "Course", "https://cdn.cloudflare.steamstatic.com/steam/apps/1562430/capsule_616x353.jpg?t=1682587412"); ListJeu.Add(TheLastOfUs); ListJeu.Add(ForzaHorizon); ListUsers.Add(user1); diff --git a/GameAtlas/GameAtlas/Views/PageParcourir.xaml b/GameAtlas/GameAtlas/Views/PageParcourir.xaml index 0577afe..ba7e2df 100644 --- a/GameAtlas/GameAtlas/Views/PageParcourir.xaml +++ b/GameAtlas/GameAtlas/Views/PageParcourir.xaml @@ -40,28 +40,7 @@ /> - - - - https://cdn1.epicgames.com/offer/b7b42e2078524ab386a8b2a9856ef557/EGS_SifuDeluxeEditionUpgradeBundle_Sloclap_Bundles_S1_2560x1440-43bae7aa2089289442238bd1e2b55655 - https://cdn.cloudflare.steamstatic.com/steam/apps/1562430/capsule_616x353.jpg?t=1682587412 - https://i.ytimg.com/vi/0JdUZOZBi2g/maxresdefault.jpg - https://staticctf.ubisoft.com/J3yJr34U2pZ2Ieem48Dwy9uqj5PNUQTn/63JzhYgJbTQC1yW74tmZLJ/dd2912bbaf7c7a8a7e005f02d3e6cf4b/jd23-buy-keyart.jpg - https://gaming-cdn.com/images/products/8893/616x353/horizon-forbidden-west-ps5-playstation-5-jeu-playstation-store-cover.jpg - https://www.highgroundgaming.com/wp-content/uploads/2020/09/Uncharted-Games-Ranked.jpg - https://i.ytimg.com/vi/WQUU8jI1Sq8/maxresdefault.jpg - https://cdn1.epicgames.com/offer/e97659b501af4e3981d5430dad170911/EGS_HogwartsLegacy_AvalancheSoftware_S1_2560x1440-2baf3188eb3c1aa248bcc1af6a927b7e - https://cdn1.epicgames.com/offer/236c74b4cd2e4e3099cbe2ebdc9686fd/EGS_DeadIsland2_DeepSilverDambusterStudios_S1_2560x1440-fdc688ce46680914ee3c4a7949ce8a67 - https://cdn.akamai.steamstatic.com/steam/apps/986130/capsule_616x353.jpg?t=1682348079 - https://cdn1.epicgames.com/offer/b7b42e2078524ab386a8b2a9856ef557/EGS_SifuDeluxeEditionUpgradeBundle_Sloclap_Bundles_S1_2560x1440-43bae7aa2089289442238bd1e2b55655 - https://cdn.cloudflare.steamstatic.com/steam/apps/1562430/capsule_616x353.jpg?t=1682587412 - https://i.ytimg.com/vi/0JdUZOZBi2g/maxresdefault.jpg - https://staticctf.ubisoft.com/J3yJr34U2pZ2Ieem48Dwy9uqj5PNUQTn/63JzhYgJbTQC1yW74tmZLJ/dd2912bbaf7c7a8a7e005f02d3e6cf4b/jd23-buy-keyart.jpg - https://image.api.playstation.com/vulcan/ap/rnd/202010/2915/X8TO4UqHFGMQbHTDwKNlWU9z.jpg - https://www.highgroundgaming.com/wp-content/uploads/2020/09/Uncharted-Games-Ranked.jpg - https://gaming-cdn.com/images/products/967/616x353/sea-of-thieves-pc-xbox-one-xbox-series-x-s-pc-xbox-one-xbox-series-x-s-jeu-microsoft-store-cover.jpg - - + -- 2.36.3 From 6b89f084b2d83beb784e0d15da7facc3c9afdbc8 Mon Sep 17 00:00:00 2001 From: Remi LAVERGNE Date: Mon, 22 May 2023 11:39:37 +0200 Subject: [PATCH 2/2] DataBiding CollectionView et DataTemplate --- GameAtlas/GameAtlas/Views/PageParcourir.xaml | 7 ++++--- GameAtlas/GameAtlas/Views/PageParcourir.xaml.cs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/GameAtlas/GameAtlas/Views/PageParcourir.xaml b/GameAtlas/GameAtlas/Views/PageParcourir.xaml index ba7e2df..9e29c84 100644 --- a/GameAtlas/GameAtlas/Views/PageParcourir.xaml +++ b/GameAtlas/GameAtlas/Views/PageParcourir.xaml @@ -2,6 +2,7 @@ @@ -40,15 +41,15 @@ /> - + - + - + diff --git a/GameAtlas/GameAtlas/Views/PageParcourir.xaml.cs b/GameAtlas/GameAtlas/Views/PageParcourir.xaml.cs index 06c6c49..d695568 100644 --- a/GameAtlas/GameAtlas/Views/PageParcourir.xaml.cs +++ b/GameAtlas/GameAtlas/Views/PageParcourir.xaml.cs @@ -9,7 +9,7 @@ public partial class PageParcourir : ContentPage public PageParcourir() { InitializeComponent(); - BindingContext = this; + BindingContext = ParcourirManager; } async void OnGame_Tapped(System.Object sender, Microsoft.Maui.Controls.TappedEventArgs e) -- 2.36.3