You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
4.1 KiB
88 lines
4.1 KiB
<?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:usecase="clr-namespace:BookApp.UseCase"
|
|
xmlns:composants="clr-namespace:BookApp.Composants"
|
|
x:Class="BookApp.Tous">
|
|
<Shell.BackButtonBehavior>
|
|
<BackButtonBehavior
|
|
IconOverride="chevron_left.svg"
|
|
TextOverride="Tous"/>
|
|
</Shell.BackButtonBehavior>
|
|
<Shell.TitleView>
|
|
<Label
|
|
Text="Tous"
|
|
FontFamily="Strande2"
|
|
TextColor="White"
|
|
VerticalTextAlignment="Center"
|
|
VerticalOptions="CenterAndExpand"
|
|
HeightRequest="50"
|
|
FontSize="Medium"
|
|
HorizontalTextAlignment="Center"/>
|
|
</Shell.TitleView>
|
|
<ContentPage.ToolbarItems>
|
|
<ToolbarItem IconImageSource="plus_icone.svg" Priority="1" Order="Primary" StyleClass="PlusButton"/>
|
|
<ToolbarItem IconImageSource="arrow_up_arrow_down.svg" Priority="1" Order="Primary" />
|
|
</ContentPage.ToolbarItems>
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<usecase:RatingToStarImageConverter x:Key="RatingToStarConverter"/>
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
<ContentPage.Content>
|
|
<CollectionView ItemsSource="{Binding BookCollection}">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackLayout>
|
|
<Grid>
|
|
<!-- Arrière-plan avec BoxView -->
|
|
<BoxView Color="LightGray" />
|
|
<!-- Label par-dessus le BoxView -->
|
|
<Label Text="{Binding Auteur.Name}"
|
|
Padding="5"
|
|
Margin="15,0,0,0"
|
|
TextColor="Black" />
|
|
</Grid>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Image Grid.Column="0"
|
|
Source="{Binding ImageBook}"
|
|
HeightRequest="125"
|
|
WidthRequest="125"
|
|
Margin="0,10,0,10"/>
|
|
<StackLayout Grid.Column="1">
|
|
<Label Text="{Binding Name}"
|
|
|
|
TextColor="Black"/>
|
|
<Label Text="{Binding Auteur.Name}"
|
|
|
|
TextColor="Black"/>
|
|
<Label
|
|
Text="{Binding Statut}"
|
|
FontAttributes="Bold"/>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<composants:RatingView Rating="{Binding Note.Rating}"/>
|
|
</Grid>
|
|
</StackLayout>
|
|
</Grid>
|
|
<BoxView Margin="25,0,0,10" HeightRequest="1" BackgroundColor="LightGray" VerticalOptions="End" />
|
|
</StackLayout>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
</ContentPage.Content>
|
|
</ContentPage> |