ADD : image cover book and more view

homepage-05-09
Lou BRODA 1 year ago
parent a9a5e562f4
commit a8b644e716

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@ -43,6 +43,11 @@
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="book_cover.png"
WidthRequest="100"
HeightRequest="100"
Grid.Column="0"
Grid.RowSpan="3"/>
<Label Text="La horde du contrevent" <Label Text="La horde du contrevent"
Grid.Column="2" Grid.Column="2"
Grid.Row="0"/> Grid.Row="0"/>

@ -15,10 +15,10 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<view:HeaderPage Grid.Row="0" <view:HeaderPage HeaderTitle="Date de publication"
HeaderTitle="Date de publication"
HeaderPlusButtonVisible="False" HeaderPlusButtonVisible="False"
HeaderSwitchButtonVisible="True"/> HeaderSwitchButtonVisible="True"
Grid.Row="0"/>
<VerticalStackLayout BackgroundColor="{DynamicResource Light}" <VerticalStackLayout BackgroundColor="{DynamicResource Light}"
Grid.Row="2"> Grid.Row="2">

@ -1,16 +1,37 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:view="clr-namespace:LivreLand.View"
xmlns:contentView="clr-namespace:LivreLand.View.ContentViews" xmlns:contentView="clr-namespace:LivreLand.View.ContentViews"
x:Class="LivreLand.View.TousView" x:Class="LivreLand.View.TousView"
Title="TousView"> Title="TousView">
<Grid> <Grid>
<ScrollView> <Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<view:HeaderPage HeaderTitle="Tous"
HeaderBackButtonText="Mes livres"
HeaderPlusButtonVisible="True"
HeaderSwitchButtonVisible="True"
Grid.Row="0"/>
<ScrollView Grid.Row="2">
<CollectionView ItemsSource="{Binding AllBooks}"> <CollectionView ItemsSource="{Binding AllBooks}">
<CollectionView.GroupHeaderTemplate> <CollectionView.GroupHeaderTemplate>
<DataTemplate> <DataTemplate>
<Label Text="Alain Damasio"/> <Grid BackgroundColor="{DynamicResource HeaderGray}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Text="{Binding Author}"
Grid.Column="1"/>
</Grid>
</DataTemplate> </DataTemplate>
</CollectionView.GroupHeaderTemplate> </CollectionView.GroupHeaderTemplate>
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
@ -21,9 +42,6 @@
<ColumnDefinition Width="10"/> <ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Column="0"/>
<Grid Grid.Column="2">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
@ -31,14 +49,22 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
</Grid> <Image Source="book_cover.png"
WidthRequest="100"
HeightRequest="100"
Grid.Column="0"
Grid.RowSpan="5"/>
<Label Text="{Binding Title}" <Label Text="{Binding Title}"
Grid.Column="2"
Grid.Row="0"/> Grid.Row="0"/>
<Label Text="{Binding Author}" <Label Text="{Binding Author}"
Grid.Column="2"
Grid.Row="1"/> Grid.Row="1"/>
<Label Text="{Binding State}" <Label Text="{Binding State}"
Grid.Column="2"
Grid.Row="2"/> Grid.Row="2"/>
<contentView:StarNotationView Grid.Row="4"/> <contentView:StarNotationView Grid.Column="2"
Grid.Row="4"/>
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>

@ -6,9 +6,9 @@ public partial class TousView : ContentPage
{ {
public List<BookModel> AllBooks { get; set; } = new List<BookModel>() public List<BookModel> AllBooks { get; set; } = new List<BookModel>()
{ {
new BookModel("Alain Damasio","La horde du contrevent","Non lu", 0), new BookModel("La horde du contrevent","Alain Damasio","Non lu", 0),
new BookModel("Alain Damasio",".La zone du dehors","Terminé", 0), new BookModel("La zone du dehors","Alain Damasio","Terminé", 0),
new BookModel("Cixin Liu","L'équateur d'Einstein","Non lu", 0) new BookModel("L'équateur d'Einstein","Cixin Liu","Non lu", 0)
}; };
public TousView() public TousView()

Loading…
Cancel
Save