<?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:local="clr-namespace:MangaMap"
             xmlns:modeles="clr-namespace:MangaMap.Model"
             x:Class="MangaMap.Views.homePage"
             xmlns:views="clr-namespace:MangaMap.Views.Composants">


    <ContentPage.BindingContext>
        <modeles:Manager/>
    </ContentPage.BindingContext>

    <Grid RowDefinitions="40, *">
        <local:NewContent1 HeightRequest="40" VerticalOptions="Start" Padding="10, 0"/>
        
    <ScrollView
        BackgroundColor="#1E1E1E"
        Grid.Row="1">
            <VerticalStackLayout
            Spacing="70"
            VerticalOptions="Center">

                <SearchBar Placeholder="Recherche"
                       CancelButtonColor="Orange"
                       TextColor="Black"
                       BackgroundColor="White"
                       HorizontalTextAlignment="Center"
                       Margin="30"
                       />

                <HorizontalStackLayout BindableLayout.ItemsSource="{Binding Oeuvres}" Spacing="100" HorizontalOptions="Center">
                    <BindableLayout.ItemTemplate>
                        <DataTemplate>
                            <ImageButton
                                    Style="{StaticResource ImageAnime}"
                                    BackgroundColor="Red"
                                    Source="{Binding Affiche}"
                                    Clicked="AnimeImageClicked"
                                />
                            <!--<views:StyleBouton -->                            
                        </DataTemplate>
                    </BindableLayout.ItemTemplate>
                </HorizontalStackLayout>


                <ListView x:Name="a1" ItemsSource="{Binding Utilisateurs}">
                    
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <ViewCell>
                                <Label Text="{Binding Pseudo}" TextColor="White" FontSize="Header"/>
                            </ViewCell>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>

            </VerticalStackLayout>


        </ScrollView>
    </Grid>
</ContentPage>