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.
78 lines
3.8 KiB
78 lines
3.8 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"
|
|
x:Class="BookApp.Composants.GroupCollection">
|
|
<ContentView.Resources>
|
|
<Style TargetType="StackLayout">
|
|
<Setter Property="VisualStateManager.VisualStateGroups">
|
|
<VisualStateGroupList>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal" />
|
|
<VisualState x:Name="Selected">
|
|
<VisualState.Setters>
|
|
<Setter Property="BackgroundColor"
|
|
Value="Transparent" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateGroupList>
|
|
</Setter>
|
|
</Style>
|
|
</ContentView.Resources>
|
|
<CollectionView ItemsSource="{Binding AuteurGroups}" IsGrouped="True" SelectionMode="Single" SelectionChanged="OnSelectionChanged">
|
|
<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>
|
|
<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}"
|
|
FontFamily="SF-Compact-Display-Bold"
|
|
FontSize="18"
|
|
TextColor="Black"/>
|
|
<Label Text="{Binding Auteur.Name}"
|
|
FontFamily="SF-Compact-Display-Semibold"
|
|
TextColor="Black"/>
|
|
<Label
|
|
TextColor="SlateGray"
|
|
Text="{Binding Statut}"/>
|
|
|
|
<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>
|