Data binding Page accueil
continuous-integration/drone/push Build is failing Details

pull/36/head
Yvan CALATAYUD 2 years ago
parent 5a991c9ea4
commit e96a255b0d

@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:views="clr-namespace:GameAtlas.Views.Composants" xmlns:views="clr-namespace:GameAtlas.Views.Composants"
xmlns:model="clr-namespace:GameAtlas.Models"
x:Class="GameAtlas.Views.PageAcceuil" x:Class="GameAtlas.Views.PageAcceuil"
Title="ACCUEIL"> Title="ACCUEIL">
<!-- WidthRequest="390" HeightRequest="844"> --> <!-- WidthRequest="390" HeightRequest="844"> -->
@ -157,123 +158,42 @@
<Grid Grid.Row="6" ColumnDefinitions="auto,auto,auto"> <Grid Grid.Row="6" ColumnDefinitions="auto,auto,auto">
<VerticalStackLayout Spacing="40"> <VerticalStackLayout Spacing="40" BindableLayout.ItemsSource="{Binding ListJeux}">
<BindableLayout.ItemTemplate>
<DataTemplate x:DataType="model:Jeu">
<HorizontalStackLayout Grid.Row="0" Spacing="20">
<HorizontalStackLayout Grid.Row="0" Spacing="20"> <Image Source="{Binding Image}" HeightRequest="60" WidthRequest="100" Margin="25,0,0,0"/>
<Image Source="cover_lastofus1.png" HeightRequest="60" WidthRequest="100" Margin="25,0,0,0"/> <VerticalStackLayout Spacing="15">
<VerticalStackLayout Spacing="15"> <Label Text="{Binding Nom}" FontFamily="PTSansNarrow-Bold" FontSize="15"/>
<Label Text="The Last of Us Part I" FontFamily="PTSansNarrow-Bold" FontSize="15"/> <HorizontalStackLayout>
<HorizontalStackLayout> <Image Style="{StaticResource Star}"/>
<Image Style="{StaticResource Star}"/> <Label Text="{Binding Note}"
<Label Text="5,0 étoiles"
TextColor="#7C7C7C" TextColor="#7C7C7C"
FontFamily="PTSansNarrow-Bold" FontFamily="PTSansNarrow-Bold"
FontSize="12" FontSize="12"
Margin="6,0,15,0"/> Margin="6,0,15,0"/>
<Image Source="download_blue.png" <Image Source="download_blue.png"
HeightRequest="20" HeightRequest="20"
WidthRequest="20" WidthRequest="20"
HorizontalOptions="Start" HorizontalOptions="Start"
VerticalOptions="Start"/> VerticalOptions="Start"/>
<Label Text="487k" <Label Text="{Binding NbTelechargement}"
TextColor="#7C7C7C" TextColor="#7C7C7C"
FontFamily="PTSansNarrow-Bold" FontFamily="PTSansNarrow-Bold"
FontSize="12" FontSize="12"
Margin="6,0,0,0"/> Margin="6,0,0,0"/>
</HorizontalStackLayout> </HorizontalStackLayout>
</VerticalStackLayout> </VerticalStackLayout>
<views:BoutonVoir/>
</HorizontalStackLayout>
<views:BoutonVoir/>
<HorizontalStackLayout Grid.Row="0" Spacing="20">
<Image Source="cover_forzahorizon5.png" HeightRequest="60" WidthRequest="100" Margin="25,0,0,0"/>
<VerticalStackLayout Spacing="15">
<Label Text="Forza Horizon 5" FontFamily="PTSansNarrow-Bold" FontSize="15"/>
<HorizontalStackLayout>
<Image Style="{StaticResource Star}"/>
<Label Text="4,8 étoiles"
TextColor="#7C7C7C"
FontFamily="PTSansNarrow-Bold"
FontSize="12"
Margin="6,0,15,0"/>
<Image Source="download_blue.png"
HeightRequest="20"
WidthRequest="20"
HorizontalOptions="Start"
VerticalOptions="Start"/>
<Label Text="420k"
TextColor="#7C7C7C"
FontFamily="PTSansNarrow-Bold"
FontSize="12"
Margin="6,0,0,0"/>
</HorizontalStackLayout> </HorizontalStackLayout>
</VerticalStackLayout> </DataTemplate>
</BindableLayout.ItemTemplate>
<Button Text="Voir" FontFamily="PTSansNarrow-Bold" FontSize="16" BackgroundColor="#FF4D00" HeightRequest="45" WidthRequest="93" Scale="0.85" CornerRadius="25" />
</HorizontalStackLayout>
<HorizontalStackLayout Grid.Row="0" Spacing="20">
<Image Source="cover_readyornot.png" HeightRequest="60" WidthRequest="100" Margin="25,0,0,0"/>
<VerticalStackLayout Spacing="15">
<Label Text="Ready or Not" FontFamily="PTSansNarrow-Bold" FontSize="15"/>
<HorizontalStackLayout>
<Image Style="{StaticResource Star}"/>
<Label Text="4,8 étoiles"
TextColor="#7C7C7C"
FontFamily="PTSansNarrow-Bold"
FontSize="12"
Margin="6,0,15,0"/>
<Image Source="download_blue.png"
HeightRequest="20"
WidthRequest="20"
HorizontalOptions="Start"
VerticalOptions="Start"/>
<Label Text="276k"
TextColor="#7C7C7C"
FontFamily="PTSansNarrow-Bold"
FontSize="12"
Margin="6,0,0,0"/>
</HorizontalStackLayout>
</VerticalStackLayout>
<Button Text="Voir" FontFamily="PTSansNarrow-Bold" FontSize="16" BackgroundColor="#FF4D00" HeightRequest="45" WidthRequest="93" Scale="0.85" CornerRadius="25" />
</HorizontalStackLayout>
<HorizontalStackLayout Grid.Row="0" Spacing="20">
<Image Source="cover_starwarsjedisurvivor.png" HeightRequest="60" WidthRequest="100" Margin="25,0,0,0"/>
<VerticalStackLayout Spacing="15">
<Label Text="Star Wars Jedi: Survivor" FontFamily="PTSansNarrow-Bold" FontSize="15"/>
<HorizontalStackLayout>
<Image Style="{StaticResource Star}"/>
<Label Text="4,7 étoiles"
TextColor="#7C7C7C"
FontFamily="PTSansNarrow-Bold"
FontSize="12"
Margin="6,0,15,0"/>
<Image Source="download_blue.png"
HeightRequest="20"
WidthRequest="20"
HorizontalOptions="Start"
VerticalOptions="Start"/>
<Label Text="310k"
TextColor="#7C7C7C"
FontFamily="PTSansNarrow-Bold"
FontSize="12"
Margin="6,0,0,0"/>
</HorizontalStackLayout>
</VerticalStackLayout>
<Button Text="Voir" FontFamily="PTSansNarrow-Bold" FontSize="16" BackgroundColor="#FF4D00" HeightRequest="45" WidthRequest="93" Scale="0.85" CornerRadius="25" />
</HorizontalStackLayout>
</VerticalStackLayout> </VerticalStackLayout>

@ -13,6 +13,8 @@ public partial class PageAcceuil : ContentPage
InitializeComponent(); InitializeComponent();
BindingContext = AccueilManager;
} }
private async void OnProfil_Tapped(object sender, EventArgs e) private async void OnProfil_Tapped(object sender, EventArgs e)

Loading…
Cancel
Save