<?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"
             x:Class="Trek_12.Views.PageProfils"
             xmlns:views="clr-namespace:Trek_12.Views.Components"
             Title="pageProfils">

    <ContentPage.Content>
        
    
        <Grid RowDefinitions="2*,3*,*">
            <Image Source="bg_profils.jpg" Grid.RowSpan="3" Aspect="AspectFill"/>


            <Label Text="Profils" TextColor="black" HorizontalTextAlignment="Center" FontSize="Header" Margin="30"/>

            <CollectionView Grid.Row="1" ItemsSource="{Binding ListPlayer}"
                ItemsLayout="VerticalList"
                VerticalOptions="Center">
                <CollectionView.ItemTemplate>
                    <DataTemplate>
                        <views:viewsProfils 
                                    Pseudo="{Binding Pseudo}"
                                    ProfilePicture="{Binding ProfilePicture}"/>
                    </DataTemplate>
                </CollectionView.ItemTemplate>
            </CollectionView>

            <HorizontalStackLayout Grid.Row="2" HorizontalOptions="Center" Spacing="50">
                <Button Text="Modifier" WidthRequest="300" HeightRequest="60" CornerRadius="4" Clicked="Button_ClickedModify"/>
                <Button Text="Créer" WidthRequest="300" HeightRequest="60" CornerRadius="4" Clicked="Button_ClickedAdd"/>
                <Button Text="Supprimer" WidthRequest="300" HeightRequest="60" CornerRadius="4" Clicked="Button_ClickedPop"/>
            </HorizontalStackLayout>
        </Grid>

    </ContentPage.Content>
</ContentPage>