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.
PocketBook/Sources/BookApp/Composants/GroupCollection.xaml

65 lines
3.3 KiB

<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:composants="clr-namespace:BookApp.Composants"
xmlns:model="clr-namespace:Model;assembly=Model"
x:Class="BookApp.Composants.GroupCollection">
<CollectionView ItemsSource="{Binding VMMrg.bookVm.AuteurGroups}" IsGrouped="True" SelectionMode="Single"
SelectionChangedCommand="{Binding ViewModelNavigation.BookSelected}"
SelectedItem="{Binding ViewModelNavigation.SelectedBook}">
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<Label Text="{Binding Name}"
FontFamily="SF-Compact-Display-Semibold"
BackgroundColor="LightGrey"
TextColor="Gray"
Padding="5"
Margin="15,0,0,0"/>
</DataTemplate>
</CollectionView.GroupHeaderTemplate>
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout Style="{StaticResource StyleCollectionStack}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0"
Source="{Binding ImageLarge}"
HeightRequest="125"
WidthRequest="125"
Margin="0,10,0,10"/>
<StackLayout Grid.Column="1">
<Label Text="{Binding Title}"
FontFamily="SF-Compact-Display-Bold"
FontSize="18"
TextColor="Black"/>
<Label Text="{Binding Authors}"
FontFamily="SF-Compact-Display-Semibold"
TextColor="Black"/>
<Label
TextColor="SlateGray"
Text="{Binding Status}"/>
<StackLayout Margin="0,10" Orientation="Horizontal" VerticalOptions="EndAndExpand">
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
<Image Source="empty_star.svg" WidthRequest="25" HeightRequest="25"/>
</StackLayout>
</StackLayout>
</Grid>
<Rectangle Margin="25,0,0,10" HeightRequest="1" BackgroundColor="LightGray" VerticalOptions="End" />
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentView>