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"/>
</Grid.RowDefinitions>
<Image Source="book_cover.png"
WidthRequest="100"
HeightRequest="100"
Grid.Column="0"
Grid.RowSpan="3"/>
<Label Text="La horde du contrevent"
Grid.Column="2"
Grid.Row="0"/>

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

@ -1,16 +1,37 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:view="clr-namespace:LivreLand.View"
xmlns:contentView="clr-namespace:LivreLand.View.ContentViews"
x:Class="LivreLand.View.TousView"
Title="TousView">
<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.GroupHeaderTemplate>
<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>
</CollectionView.GroupHeaderTemplate>
<CollectionView.ItemTemplate>
@ -21,24 +42,29 @@
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0"/>
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
</Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Image Source="book_cover.png"
WidthRequest="100"
HeightRequest="100"
Grid.Column="0"
Grid.RowSpan="5"/>
<Label Text="{Binding Title}"
Grid.Column="2"
Grid.Row="0"/>
<Label Text="{Binding Author}"
Grid.Column="2"
Grid.Row="1"/>
<Label Text="{Binding State}"
Grid.Column="2"
Grid.Row="2"/>
<contentView:StarNotationView Grid.Row="4"/>
<contentView:StarNotationView Grid.Column="2"
Grid.Row="4"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>

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

Loading…
Cancel
Save